Skip to content

Commit 4cce4ef

Browse files
SRabbeliergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9fee24c commit 4cce4ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fast-import.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,11 +3135,11 @@ static int parse_one_feature(const char *feature, int from_stream)
31353135
option_export_marks(feature + 13);
31363136
} else if (!strcmp(feature, "cat-blob")) {
31373137
; /* Don't die - this feature is supported */
3138-
} else if (!prefixcmp(feature, "relative-marks")) {
3138+
} else if (!strcmp(feature, "relative-marks")) {
31393139
relative_marks_paths = 1;
3140-
} else if (!prefixcmp(feature, "no-relative-marks")) {
3140+
} else if (!strcmp(feature, "no-relative-marks")) {
31413141
relative_marks_paths = 0;
3142-
} else if (!prefixcmp(feature, "force")) {
3142+
} else if (!strcmp(feature, "force")) {
31433143
force_update = 1;
31443144
} else if (!strcmp(feature, "notes") || !strcmp(feature, "ls")) {
31453145
; /* do nothing; we have the feature */

0 commit comments

Comments
 (0)