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 <newren@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4532be7cba
commit
b93b81e799
@ -31,8 +31,8 @@ static const char *fast_export_usage[] = {
|
||||
};
|
||||
|
||||
static int progress;
|
||||
static enum { ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = ABORT;
|
||||
static enum { ERROR, DROP, REWRITE } tag_of_filtered_mode = ERROR;
|
||||
static enum { SIGNED_TAG_ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = SIGNED_TAG_ABORT;
|
||||
static enum { TAG_FILTERING_ABORT, DROP, REWRITE } tag_of_filtered_mode = TAG_FILTERING_ABORT;
|
||||
static int fake_missing_tagger;
|
||||
static int use_done_feature;
|
||||
static int no_data;
|
||||
@ -46,7 +46,7 @@ static int parse_opt_signed_tag_mode(const struct option *opt,
|
||||
const char *arg, int unset)
|
||||
{
|
||||
if (unset || !strcmp(arg, "abort"))
|
||||
signed_tag_mode = ABORT;
|
||||
signed_tag_mode = SIGNED_TAG_ABORT;
|
||||
else if (!strcmp(arg, "verbatim") || !strcmp(arg, "ignore"))
|
||||
signed_tag_mode = VERBATIM;
|
||||
else if (!strcmp(arg, "warn"))
|
||||
@ -64,7 +64,7 @@ static int parse_opt_tag_of_filtered_mode(const struct option *opt,
|
||||
const char *arg, int unset)
|
||||
{
|
||||
if (unset || !strcmp(arg, "abort"))
|
||||
tag_of_filtered_mode = ERROR;
|
||||
tag_of_filtered_mode = TAG_FILTERING_ABORT;
|
||||
else if (!strcmp(arg, "drop"))
|
||||
tag_of_filtered_mode = DROP;
|
||||
else if (!strcmp(arg, "rewrite"))
|
||||
@ -728,7 +728,7 @@ static void handle_tag(const char *name, struct tag *tag)
|
||||
"\n-----BEGIN PGP SIGNATURE-----\n");
|
||||
if (signature)
|
||||
switch(signed_tag_mode) {
|
||||
case ABORT:
|
||||
case SIGNED_TAG_ABORT:
|
||||
die("encountered signed tag %s; use "
|
||||
"--signed-tags=<mode> to handle it",
|
||||
oid_to_hex(&tag->object.oid));
|
||||
@ -753,7 +753,7 @@ static void handle_tag(const char *name, struct tag *tag)
|
||||
tagged_mark = get_object_mark(tagged);
|
||||
if (!tagged_mark) {
|
||||
switch(tag_of_filtered_mode) {
|
||||
case ABORT:
|
||||
case TAG_FILTERING_ABORT:
|
||||
die("tag %s tags unexported object; use "
|
||||
"--tag-of-filtered-object=<mode> to handle it",
|
||||
oid_to_hex(&tag->object.oid));
|
||||
|
Loading…
Reference in New Issue
Block a user