Skip to content

Commit b93b81e

Browse files
newrengitster
authored andcommitted
fast-export: use value from correct enum
ABORT and ERROR happen to have the same value, but come from differnt enums. Use the one from the correct enum, and while at it, rename the values to avoid such problems. Signed-off-by: Elijah Newren <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4532be7 commit b93b81e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

builtin/fast-export.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ static const char *fast_export_usage[] = {
3131
};
3232

3333
static int progress;
34-
static enum { ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = ABORT;
35-
static enum { ERROR, DROP, REWRITE } tag_of_filtered_mode = ERROR;
34+
static enum { SIGNED_TAG_ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = SIGNED_TAG_ABORT;
35+
static enum { TAG_FILTERING_ABORT, DROP, REWRITE } tag_of_filtered_mode = TAG_FILTERING_ABORT;
3636
static int fake_missing_tagger;
3737
static int use_done_feature;
3838
static int no_data;
@@ -46,7 +46,7 @@ static int parse_opt_signed_tag_mode(const struct option *opt,
4646
const char *arg, int unset)
4747
{
4848
if (unset || !strcmp(arg, "abort"))
49-
signed_tag_mode = ABORT;
49+
signed_tag_mode = SIGNED_TAG_ABORT;
5050
else if (!strcmp(arg, "verbatim") || !strcmp(arg, "ignore"))
5151
signed_tag_mode = VERBATIM;
5252
else if (!strcmp(arg, "warn"))
@@ -64,7 +64,7 @@ static int parse_opt_tag_of_filtered_mode(const struct option *opt,
6464
const char *arg, int unset)
6565
{
6666
if (unset || !strcmp(arg, "abort"))
67-
tag_of_filtered_mode = ERROR;
67+
tag_of_filtered_mode = TAG_FILTERING_ABORT;
6868
else if (!strcmp(arg, "drop"))
6969
tag_of_filtered_mode = DROP;
7070
else if (!strcmp(arg, "rewrite"))
@@ -728,7 +728,7 @@ static void handle_tag(const char *name, struct tag *tag)
728728
"\n-----BEGIN PGP SIGNATURE-----\n");
729729
if (signature)
730730
switch(signed_tag_mode) {
731-
case ABORT:
731+
case SIGNED_TAG_ABORT:
732732
die("encountered signed tag %s; use "
733733
"--signed-tags=<mode> to handle it",
734734
oid_to_hex(&tag->object.oid));
@@ -753,7 +753,7 @@ static void handle_tag(const char *name, struct tag *tag)
753753
tagged_mark = get_object_mark(tagged);
754754
if (!tagged_mark) {
755755
switch(tag_of_filtered_mode) {
756-
case ABORT:
756+
case TAG_FILTERING_ABORT:
757757
die("tag %s tags unexported object; use "
758758
"--tag-of-filtered-object=<mode> to handle it",
759759
oid_to_hex(&tag->object.oid));

0 commit comments

Comments
 (0)