Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15

Re: [PATCH 4/5] log: parse detached options like git log --grep foo

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:13

Hi,

Glance over this again:
quoted hunk ↗ jump to hunk
+++ b/revision.c
@@ -1382,12 +1400,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
 		revs->grep_filter.fixed = 1;
 	} else if (!strcmp(arg, "--all-match")) {
 		revs->grep_filter.all_match = 1;
-	} else if (!prefixcmp(arg, "--encoding=")) {
-		arg += 11;
+	} else if ((argcount = diff_long_opt("encoding", argv, &optarg))) {
 		if (strcmp(arg, "none"))
-			git_log_output_encoding = xstrdup(arg);
+			git_log_output_encoding = xstrdup(optarg);
I think arg should be optarg in the string comparison, too.  Sorry I
didn’t notice last time.

I wonder why t3900 and t8005 do not catch this.
 		else
 			git_log_output_encoding = "";
Curious,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help