diff options
author | Sverre Rabbelier <srabbelier@gmail.com> | 2011-05-05 20:56:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-05 21:21:24 -0700 |
commit | 4cce4ef2d5b2a3be1ddb17e9aa12b3307900b41d (patch) | |
tree | a4313c6f91918e995ea3a5283b0a34d1da9d80c8 | |
parent | 9fee24cac87078ae48b5a74ecafaca751f5edfd6 (diff) | |
download | git-4cce4ef2d5b2a3be1ddb17e9aa12b3307900b41d.tar.gz git-4cce4ef2d5b2a3be1ddb17e9aa12b3307900b41d.tar.xz |
fast-import: fix option parser for no-arg options
While refactoring the options parser in bc3c79a (fast-import: add
(non-)relative-marks feature, 2009-12-04), it was made too lenient
for options that take no argument, fix that.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | fast-import.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c index 3e4e655bb..78d978684 100644 --- a/fast-import.c +++ b/fast-import.c @@ -3135,11 +3135,11 @@ static int parse_one_feature(const char *feature, int from_stream) option_export_marks(feature + 13); } else if (!strcmp(feature, "cat-blob")) { ; /* Don't die - this feature is supported */ - } else if (!prefixcmp(feature, "relative-marks")) { + } else if (!strcmp(feature, "relative-marks")) { relative_marks_paths = 1; - } else if (!prefixcmp(feature, "no-relative-marks")) { + } else if (!strcmp(feature, "no-relative-marks")) { relative_marks_paths = 0; - } else if (!prefixcmp(feature, "force")) { + } else if (!strcmp(feature, "force")) { force_update = 1; } else if (!strcmp(feature, "notes") || !strcmp(feature, "ls")) { ; /* do nothing; we have the feature */ |