summaryrefslogtreecommitdiff
path: root/show-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-04-17 04:29:45 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-17 04:29:45 (GMT)
commitb70c8942d3fab4dff86461919a8c18eb3d020cea (patch)
tree5d374ca6970d503b3d1a93170d65a02ec5d6d4ff /show-diff.c
parent9bd94cafdf104e613d7609401e60711cd08e209c (diff)
downloadgit-b70c8942d3fab4dff86461919a8c18eb3d020cea.zip
git-b70c8942d3fab4dff86461919a8c18eb3d020cea.tar.gz
git-b70c8942d3fab4dff86461919a8c18eb3d020cea.tar.bz2
[PATCH] Rename confusing variable in show-diff
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. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'show-diff.c')
-rw-r--r--show-diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/show-diff.c b/show-diff.c
index f2d352f..a00ee72 100644
--- a/show-diff.c
+++ b/show-diff.c
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
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 @@ int main(int argc, char **argv)
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;
}