projects
/
gimrr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
169285f
)
git-mr-tag: don't allow users to add reserved tags
author
Frantisek Hrbata
<frantisek@hrbata.com>
Wed, 16 Dec 2020 16:32:37 +0000
(17:32 +0100)
committer
Frantisek Hrbata
<frantisek@hrbata.com>
Wed, 16 Dec 2020 16:32:37 +0000
(17:32 +0100)
This would be caught by git-mr-update, but let's inform users about
this while the tag is created.
Signed-off-by: Frantisek Hrbata <frantisek@hrbata.com>
git-mr-tag
patch
|
blob
|
history
diff --git
a/git-mr-tag
b/git-mr-tag
index 41d44d62e3490253deddbc59c1faee2acde229fe..5dfa0135e2c500d5f9d6abac322fdba46a434ce8 100755
(executable)
--- a/
git-mr-tag
+++ b/
git-mr-tag
@@
-53,6
+53,9
@@
tag = args.tag.strip()
if not tag.isalnum():
sys.exit("Invalid tag name.")
+if tag in mrlib.reserved_tags:
+ sys.exit("Tag name '{}' is reserved.".format(tag))
+
user = mrlib.get_user()
refs = mrlib.load_refs()
mr = mrlib.verify_mrs([args.mr], refs)[0]