summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-12-13 21:12:34 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-12-13 21:12:34 -0800
commit43176d1e4cddc4ab2f2f7dc6f3ba10513ffc2f2b (patch)
treee6bf1144ecadffb3faa68c4dac600e2fbccb0fe8
parentMerge branch 'ml/mailmap' into maint-1.7.6 (diff)
parentname-rev --all: do not even attempt to describe non-commit object (diff)
downloadtgif-43176d1e4cddc4ab2f2f7dc6f3ba10513ffc2f2b.tar.xz
Merge branch 'jc/maint-name-rev-all' into maint-1.7.6
* jc/maint-name-rev-all: name-rev --all: do not even attempt to describe non-commit object
-rw-r--r--builtin/name-rev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 31f5c1c971..e8862b5de2 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -289,7 +289,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
max = get_max_object_index();
for (i = 0; i < max; i++) {
struct object *obj = get_indexed_object(i);
- if (!obj)
+ if (!obj || obj->type != OBJ_COMMIT)
continue;
show_name(obj, NULL,
always, allow_undefined, data.name_only);