git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] show-diff style fix.

From
Junio C Hamano <junkio@cox.net>
Date
Apr 17, 2005, 02:15 UTC
Message-ID
<7voece2lox.fsf@assigned-by-dhcp.cox.net>

This fixes some stylistic problems introduced by my previous set of patches. I'll be sending my last patch to show-diff next, which depends on this cleanup.

To be applied on top of my previous patches:
    [PATCH] Optionally tell show-diff to show only named files.
    [PATCH] show-diff -z option for machine readable output.
    [PATCH] show-diff shell safety.
    [PATCH] (take 2) Rename confusing variable in show-diff.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 show-diff.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

--- ./show-diff.c 2005-04-16 18:59:09.000000000 -0700 +++ ./show-diff.c 2005-04-16 19:01:28.000000000 -0700

@@ -111,7 +111,7 @@
 	}
 }
 
-static const char *show_diff_usage = "show-diff [-s] [-q] [-z] [paths...]";
+static const char *show_diff_usage = "show-diff [-q] [-s] [-z] [paths...]";
 
 static int matches_pathspec(struct cache_entry *ce, char **spec, int cnt)
 {
@@ -141,9 +141,8 @@
 			silent_on_nonexisting_files = silent = 1;
 		else if (!strcmp(argv[1], "-q"))
 			silent_on_nonexisting_files = 1;
-		else if (!strcmp(argv[1], "-z")) {
+		else if (!strcmp(argv[1], "-z"))
 			machine_readable = 1;
-		}
 		else
 			usage(show_diff_usage);
 		argv++; argc--;
@@ -164,7 +163,7 @@
 		char type[20];
 		void *old;
 
-		if (1 <argc &&
+		if (1 < argc &&
 		    ! matches_pathspec(ce, argv+1, argc-1))
 			continue;
 
Message 1 of 1 in “show-diff style fix.”
  1. show-diff style fix.Junio C Hamano, Apr 17, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.