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>
Sverre Rabbelier committed
May 5, 2011 at 20:56 UTC
4cce4ef2d5b2a3be1ddb17e9aa12b3307900b41d
1 file changed
+3
-3
fast-import.c
+3
-3
@@ -3135,11 +3135,11 @@ static int parse_one_feature(const char *feature, int from_stream)
3135
option_export_marks(feature + 13);
3136
} else if (!strcmp(feature, "cat-blob")) {
3137
; /* Don't die - this feature is supported */
3138
- } else if (!prefixcmp(feature, "relative-marks")) {
3138
+ } else if (!strcmp(feature, "relative-marks")) {
3139
relative_marks_paths = 1;
3140
- } else if (!prefixcmp(feature, "no-relative-marks")) {
3140
+ } else if (!strcmp(feature, "no-relative-marks")) {
3141
relative_marks_paths = 0;
3142
- } else if (!prefixcmp(feature, "force")) {
3142
+ } else if (!strcmp(feature, "force")) {
3143
force_update = 1;
3144
} else if (!strcmp(feature, "notes") || !strcmp(feature, "ls")) {
3145
; /* do nothing; we have the feature */