From: Sverre Rabbelier <srabbelier@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Michael J Gruber <git@drmicha.warpmail.net>,
"Git List" <git@vger.kernel.org>
Cc: Sverre Rabbelier <srabbelier@gmail.com>
Subject: [PATCH] fast-import: fix option parser forno-arg options
Date: Thu, 5 May 2011 20:56:00 +0200 [thread overview]
Message-ID: <1304621760-22261-1-git-send-email-srabbelier@gmail.com> (raw)
In-Reply-To: <7v7ha59icw.fsf@alter.siamese.dyndns.org>
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>
---
I noticed that force was also wrong. All other option parsing
checks are made using the right version though.
fast-import.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 3e4e655..78d9786 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 */
--
1.7.5.1.292.g728120
prev parent reply other threads:[~2011-05-05 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 9:13 [PATCH] git-fast-import.txt: --relative-marks takes no parameter Michael J Gruber
2011-05-05 17:18 ` Junio C Hamano
2011-05-05 18:56 ` Sverre Rabbelier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304621760-22261-1-git-send-email-srabbelier@gmail.com \
--to=srabbelier@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).