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

Re: [PATCH 3/4] diff-no-index: Remove unused variable.

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:58:09

Stefan Beller wrote:
[Subject: diff-no-index: Remove unused variable.]
[...]
quoted hunk ↗ jump to hunk
--- a/diff-no-index.c
+++ b/diff-no-index.c
[...]
-		else if (!strcmp(argv[i], "-q")) {
+		else if (!strcmp(argv[i], "-q"))
-			options |= DIFF_SILENT_ON_REMOVED;
 			i++;
-		}
This feature was obviously never tested with --no-index, so I agree it
makes sense to remove it.  Probably the commit message and a comment
should say so, though.  E.g.:

	diff --no-index: remove nonfunctional "-q" handling

	Before v1.5.6-rc1~41^2~2, the option parsing for diff --no-index
	and "git diff-files" shared code.  In "git diff-files", "-q" means
	to be silent about removed files.  In "git diff --no-index", in
	various versions it has been an error, an infinite loop, or a no-op.

	Simplify the code to clarify that it is now a no-op, continuing to
	accept and ignore the -q option in "git diff --no-index" to avoid
	breaking scripts.

I wouldn't mind removing support for "-q" altogether, by the way (as a
separate change).

Hope that helps,
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