diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-06-06 09:21:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-06 09:21:48 -0700 |
commit | e919cb302e75141c2565106bed2f0b6cb8047570 (patch) | |
tree | 8c246f5ba59538f68022deb009b55bb8dc9b7e2d /builtin-name-rev.c | |
parent | 7f718e8b46b37a9e1caf58a372938817f04885d9 (diff) | |
parent | c0f6dc9b20523a569e567d3be4cabbc949c71b43 (diff) | |
download | git-e919cb302e75141c2565106bed2f0b6cb8047570.tar.gz git-e919cb302e75141c2565106bed2f0b6cb8047570.tar.xz |
Merge branch 'maint'
* maint:
git-for-each-ref.txt: minor improvements
name-rev: Fix segmentation fault when using --all
Diffstat (limited to 'builtin-name-rev.c')
-rw-r--r-- | builtin-name-rev.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin-name-rev.c b/builtin-name-rev.c index cde5de56f..f153da012 100644 --- a/builtin-name-rev.c +++ b/builtin-name-rev.c @@ -280,9 +280,13 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix) int i, max; max = get_max_object_index(); - for (i = 0; i < max; i++) - show_name(get_indexed_object(i), NULL, + for (i = 0; i < max; i++) { + struct object *obj = get_indexed_object(i); + if (!obj) + continue; + show_name(obj, NULL, always, allow_undefined, data.name_only); + } } else { int i; for (i = 0; i < revs.nr; i++) |