threads / patch / 1110

patchFixlet for argument parsing in rev-list.

Subject: [PATCH] Fixlet for argument parsing in rev-list.

## tl;dr

2 messages between Jul 5, 2005 and Jul 5, 2005. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Junio C Hamano· Jul 5, 2005, 07:54 UTC · lore

The --merge-order flag does not take parameter so there is no point doing strncmp with the length.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 rev-list.c |    2 +-
 1 file changed, 1 insertions(+), 1 deletions(-)
Show changes to rev-list.c +1 −1
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -462,7 +462,7 @@ int main(int argc, char **argv)
 			limited = 1;
 			continue;
 		}
-		if (!strncmp(arg, "--merge-order", 13)) {
+		if (!strcmp(arg, "--merge-order")) {
 		        merge_order = 1;
 			continue;
 		}
------------------------------------------------
Jon Seymour· Jul 5, 2005, 09:14 UTC · re: Junio C Hamano · lore

Re: [PATCH] Fixlet for argument parsing in rev-list.

I ack the patch, though --show-breaks could use the same treatment.
jon.
On 7/5/05, Junio C Hamano <junkio@cox.net> wrote:
Show 24 quoted lines
> The --merge-order flag does not take parameter so there is no
> point doing strncmp with the length.
> 
> Signed-off-by: Junio C Hamano <junkio@cox.net>
> ---
> 
>  rev-list.c |    2 +-
>  1 file changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/rev-list.c b/rev-list.c
> --- a/rev-list.c
> +++ b/rev-list.c
> @@ -462,7 +462,7 @@ int main(int argc, char **argv)
>                         limited = 1;
>                         continue;
>                 }
> -               if (!strncmp(arg, "--merge-order", 13)) {
> +               if (!strcmp(arg, "--merge-order")) {
>                         merge_order = 1;
>                         continue;
>                 }
> ------------------------------------------------
> 
> 
-- 
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/

← back to recent threads