{"thread":{"id":"27264","subject":"[PATCH] git-fast-import.txt: --relative-marks takes no parameter","startedAt":"2011-05-05T09:13:38Z","lastAt":"2011-05-05T18:56:00Z","messageCount":3,"participants":["Michael J Gruber","Junio C Hamano","Sverre Rabbelier"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167097","messageId":"a1f7a117ba4deff49c7462f62e1be5da500540fb.1304586800.git.git@drmicha.warpmail.net","threadId":"27264","inReplyTo":null,"subject":"[PATCH] git-fast-import.txt: --relative-marks takes no parameter","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-05-05T09:13:38Z","receivedAt":"2011-05-05T09:13:38Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Remove spurious \"=\" after --relative-marks.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/git-fast-import.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt\nindex 2c2ea12..249249a 100644\n--- a/Documentation/git-fast-import.txt\n+++ b/Documentation/git-fast-import.txt\n@@ -83,7 +83,7 @@ OPTIONS\n \tskips the file if it does not exist.\n \n --relative-marks::\n-\tAfter specifying --relative-marks= the paths specified\n+\tAfter specifying --relative-marks the paths specified\n \twith --import-marks= and --export-marks= are relative\n \tto an internal directory in the current repository.\n \tIn git-fast-import this means that the paths are relative\n@@ -93,7 +93,7 @@ OPTIONS\n --no-relative-marks::\n \tNegates a previous --relative-marks. Allows for combining\n \trelative and non-relative marks by interweaving\n-\t--(no-)-relative-marks= with the --(import|export)-marks=\n+\t--(no-)-relative-marks with the --(import|export)-marks=\n \toptions.\n \n --cat-blob-fd=<fd>::\n-- \n1.7.5.1.336.g3803d\n"},{"id":"167130","messageId":"7v7ha59icw.fsf@alter.siamese.dyndns.org","threadId":"27264","inReplyTo":"a1f7a117ba4deff49c7462f62e1be5da500540fb.1304586800.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] git-fast-import.txt: --relative-marks takes no parameter","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-05T17:18:07Z","receivedAt":"2011-05-05T17:18:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Remove spurious \"=\" after --relative-marks.\n\n\"fast-import\" does accept --relative-marks= (or --relative-marksmith for\nthat matter), I think, as its parser added in bc3c79a (fast-import: add\n(non-)relative-marks feature, 2009-12-04) is broken and uses prefixcmp()\nwhen parsing the command line.  Sverre may want to fix it.\n\nBut your patch is the right thing to do anyway, as I think this option\nnever meant to accept any option argument.\n\nWill apply.  Thanks.\n\n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n>  Documentation/git-fast-import.txt |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt\n> index 2c2ea12..249249a 100644\n> --- a/Documentation/git-fast-import.txt\n> +++ b/Documentation/git-fast-import.txt\n> @@ -83,7 +83,7 @@ OPTIONS\n>  \tskips the file if it does not exist.\n>  \n>  --relative-marks::\n> -\tAfter specifying --relative-marks= the paths specified\n> +\tAfter specifying --relative-marks the paths specified\n>  \twith --import-marks= and --export-marks= are relative\n>  \tto an internal directory in the current repository.\n>  \tIn git-fast-import this means that the paths are relative\n> @@ -93,7 +93,7 @@ OPTIONS\n>  --no-relative-marks::\n>  \tNegates a previous --relative-marks. Allows for combining\n>  \trelative and non-relative marks by interweaving\n> -\t--(no-)-relative-marks= with the --(import|export)-marks=\n> +\t--(no-)-relative-marks with the --(import|export)-marks=\n>  \toptions.\n>  \n>  --cat-blob-fd=<fd>::\n"},{"id":"167136","messageId":"1304621760-22261-1-git-send-email-srabbelier@gmail.com","threadId":"27264","inReplyTo":"7v7ha59icw.fsf@alter.siamese.dyndns.org","subject":"[PATCH] fast-import: fix option parser forno-arg options","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2011-05-05T18:56:00Z","receivedAt":"2011-05-05T18:56:00Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"While refactoring the options parser in bc3c79a (fast-import: add\n(non-)relative-marks feature, 2009-12-04), it was made too lenient\nfor options that take no argument, fix that.\n\nSigned-off-by: Sverre Rabbelier <srabbelier@gmail.com>\n---\n\n  I noticed that force was also wrong. All other option parsing\n  checks are made using the right version though.\n\n fast-import.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/fast-import.c b/fast-import.c\nindex 3e4e655..78d9786 100644\n--- a/fast-import.c\n+++ b/fast-import.c\n@@ -3135,11 +3135,11 @@ static int parse_one_feature(const char *feature, int from_stream)\n \t\toption_export_marks(feature + 13);\n \t} else if (!strcmp(feature, \"cat-blob\")) {\n \t\t; /* Don't die - this feature is supported */\n-\t} else if (!prefixcmp(feature, \"relative-marks\")) {\n+\t} else if (!strcmp(feature, \"relative-marks\")) {\n \t\trelative_marks_paths = 1;\n-\t} else if (!prefixcmp(feature, \"no-relative-marks\")) {\n+\t} else if (!strcmp(feature, \"no-relative-marks\")) {\n \t\trelative_marks_paths = 0;\n-\t} else if (!prefixcmp(feature, \"force\")) {\n+\t} else if (!strcmp(feature, \"force\")) {\n \t\tforce_update = 1;\n \t} else if (!strcmp(feature, \"notes\") || !strcmp(feature, \"ls\")) {\n \t\t; /* do nothing; we have the feature */\n-- \n1.7.5.1.292.g728120\n"}]}