got tag -V is like tag -l with verification, fix option-conflicts accordingly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/got/got.c b/got/got.c
index 74be945..873d24a 100644
--- a/got/got.c
+++ b/got/got.c
@@ -7380,33 +7380,27 @@ cmd_tag(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (do_list) {
+ if (do_list || verify_tags) {
if (commit_id_arg != NULL)
errx(1,
"-c option can only be used when creating a tag");
- if (tagmsg)
- option_conflict('l', 'm');
- if (signer_id)
- option_conflict('l', 's');
- if (verify_tags)
- option_conflict('l', 'V');
+ if (tagmsg) {
+ if (do_list)
+ option_conflict('l', 'm');
+ else
+ option_conflict('V', 'm');
+ }
+ if (signer_id) {
+ if (do_list)
+ option_conflict('l', 's');
+ else
+ option_conflict('V', 's');
+ }
if (argc > 1)
usage_tag();
} else if (argc != 1)
usage_tag();
- if (verify_tags) {
- if (commit_id_arg != NULL)
- errx(1,
- "-c option can only be used when creating a tag");
- if (tagmsg)
- option_conflict('V', 'm');
- if (signer_id)
- option_conflict('V', 's');
- if (do_list)
- option_conflict('V', 'l');
- }
-
if (argc == 1)
tag_name = argv[0];