summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-13 21:12:34 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-13 21:12:34 -0800
commit43176d1e4cddc4ab2f2f7dc6f3ba10513ffc2f2b (patch)
treee6bf1144ecadffb3faa68c4dac600e2fbccb0fe8
parent6d1cdadbeeb03f40250526e29b1f1a91582911d8 (diff)
parente8b14d7e3fa5194fbc776cdd253b0b5403b2226d (diff)
downloadgit-43176d1e4cddc4ab2f2f7dc6f3ba10513ffc2f2b.tar.gz
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);