From: Junio C Hamano Date: Sun, 17 Apr 2005 04:29:45 +0000 (-0700) Subject: [PATCH] Rename confusing variable in show-diff X-Git-Tag: v0.99~859 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b70c8942d3fab4dff86461919a8c18eb3d020cea;p=git.git [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 Signed-off-by: Linus Torvalds --- diff --git a/show-diff.c b/show-diff.c index f2d352f4..a00ee72e 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 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; }