Skip to content

Commit 026f09e

Browse files
mhaggergitster
authored andcommitted
cmd_diff(): rename local variable "list" -> "entry"
It's not a list, it's an array entry. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 33055fa commit 026f09e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

builtin/diff.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
339339
}
340340

341341
for (i = 0; i < rev.pending.nr; i++) {
342-
struct object_array_entry *list = rev.pending.objects+i;
343-
struct object *obj = list->item;
344-
const char *name = list->name;
342+
struct object_array_entry *entry = &rev.pending.objects[i];
343+
struct object *obj = entry->item;
344+
const char *name = entry->name;
345345
int flags = (obj->flags & UNINTERESTING);
346346
if (!obj->parsed)
347347
obj = parse_object(obj->sha1);
@@ -360,7 +360,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
360360
die(_("more than two blobs given: '%s'"), name);
361361
hashcpy(blob[blobs].sha1, obj->sha1);
362362
blob[blobs].name = name;
363-
blob[blobs].mode = list->mode;
363+
blob[blobs].mode = entry->mode;
364364
blobs++;
365365
continue;
366366

0 commit comments

Comments
 (0)