* [PATCH] git-fast-import.txt: --relative-marks takes no parameter
@ 2011-05-05 9:13 Michael J Gruber
2011-05-05 17:18 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Michael J Gruber @ 2011-05-05 9:13 UTC (permalink / raw)
To: git
Remove spurious "=" after --relative-marks.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Documentation/git-fast-import.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 2c2ea12..249249a 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -83,7 +83,7 @@ OPTIONS
skips the file if it does not exist.
--relative-marks::
- After specifying --relative-marks= the paths specified
+ After specifying --relative-marks the paths specified
with --import-marks= and --export-marks= are relative
to an internal directory in the current repository.
In git-fast-import this means that the paths are relative
@@ -93,7 +93,7 @@ OPTIONS
--no-relative-marks::
Negates a previous --relative-marks. Allows for combining
relative and non-relative marks by interweaving
- --(no-)-relative-marks= with the --(import|export)-marks=
+ --(no-)-relative-marks with the --(import|export)-marks=
options.
--cat-blob-fd=<fd>::
--
1.7.5.1.336.g3803d
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] git-fast-import.txt: --relative-marks takes no parameter
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 ` [PATCH] fast-import: fix option parser forno-arg options Sverre Rabbelier
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2011-05-05 17:18 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git, Sverre Rabbelier
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Remove spurious "=" after --relative-marks.
"fast-import" does accept --relative-marks= (or --relative-marksmith for
that matter), I think, as its parser added in bc3c79a (fast-import: add
(non-)relative-marks feature, 2009-12-04) is broken and uses prefixcmp()
when parsing the command line. Sverre may want to fix it.
But your patch is the right thing to do anyway, as I think this option
never meant to accept any option argument.
Will apply. Thanks.
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> Documentation/git-fast-import.txt | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
> index 2c2ea12..249249a 100644
> --- a/Documentation/git-fast-import.txt
> +++ b/Documentation/git-fast-import.txt
> @@ -83,7 +83,7 @@ OPTIONS
> skips the file if it does not exist.
>
> --relative-marks::
> - After specifying --relative-marks= the paths specified
> + After specifying --relative-marks the paths specified
> with --import-marks= and --export-marks= are relative
> to an internal directory in the current repository.
> In git-fast-import this means that the paths are relative
> @@ -93,7 +93,7 @@ OPTIONS
> --no-relative-marks::
> Negates a previous --relative-marks. Allows for combining
> relative and non-relative marks by interweaving
> - --(no-)-relative-marks= with the --(import|export)-marks=
> + --(no-)-relative-marks with the --(import|export)-marks=
> options.
>
> --cat-blob-fd=<fd>::
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] fast-import: fix option parser forno-arg options
2011-05-05 17:18 ` Junio C Hamano
@ 2011-05-05 18:56 ` Sverre Rabbelier
0 siblings, 0 replies; 3+ messages in thread
From: Sverre Rabbelier @ 2011-05-05 18:56 UTC (permalink / raw)
To: Junio C Hamano, Michael J Gruber, Git List; +Cc: Sverre Rabbelier
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-05 17:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] fast-import: fix option parser forno-arg options Sverre Rabbelier
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).