git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Rename confusing variable in show-diff
@ 2005-04-17  1:10 Junio C Hamano
  2005-04-17  1:26 ` [PATCH] (take 2) " Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2005-04-17  1:10 UTC (permalink / raw
  To: Linus Torvalds; +Cc: git

The show-diff command uses a variable "new" but it is always
used to point at the original data recorded in the dircache
before the user started editing in the working file.  Rename it
to "old" to avoid confusion.

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.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

 show-diff.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

show-diff.c: e52eee21c2f682bef2dba06445699cca8e34c63a
--- show-diff.c
+++ show-diff.c	2005-04-16 18:05:55.000000000 -0700
@@ -162,7 +162,7 @@
 		int changed;
 		unsigned long size;
 		char type[20];
-		void *new;
+		void *old;
 
 		if (1 <argc &&
 		    ! matches_pathspec(ce, argv+1, argc-1))
@@ -193,8 +193,8 @@
 		if (silent)
 			continue;
 
-		new = read_sha1_file(ce->sha1, type, &size);
-		show_differences(ce->name, new, size);
+		old = read_sha1_file(ce->sha1, type, &size);
+		show_differences(ce->name, old, size);
 		free(new);
 	}
 	return 0;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] (take 2) Rename confusing variable in show-diff
  2005-04-17  1:10 [PATCH] Rename confusing variable in show-diff Junio C Hamano
@ 2005-04-17  1:26 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2005-04-17  1:26 UTC (permalink / raw
  To: Linus Torvalds; +Cc: git

Oops, sorry I screwed up and sent a wrong patch.  Please discard
the previous one.

The show-diff command uses a variable "new" but it is always
used to point at the original data recorded in the dircache
before the user started editing in the working file.  Rename it
to "old" to avoid confusion.

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.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

 show-diff.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

show-diff.c: e52eee21c2f682bef2dba06445699cca8e34c63a
--- show-diff.c
+++ show-diff.c	2005-04-16 18:23:57.000000000 -0700
@@ -162,7 +162,7 @@
 		int changed;
 		unsigned long size;
 		char type[20];
-		void *new;
+		void *old;
 
 		if (1 <argc &&
 		    ! matches_pathspec(ce, argv+1, argc-1))
@@ -193,9 +193,9 @@
 		if (silent)
 			continue;
 
-		new = read_sha1_file(ce->sha1, type, &size);
-		show_differences(ce->name, new, size);
-		free(new);
+		old = read_sha1_file(ce->sha1, type, &size);
+		show_differences(ce->name, old, size);
+		free(old);
 	}
 	return 0;
 }



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-17  1:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-17  1:10 [PATCH] Rename confusing variable in show-diff Junio C Hamano
2005-04-17  1:26 ` [PATCH] (take 2) " Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).