aboutsummaryrefslogtreecommitdiff
path: root/builtin/name-rev.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-11-18 11:14:16 -0800
committerJunio C Hamano <gitster@pobox.com>2011-11-18 11:14:16 -0800
commitc9de921848061db9316fe8dc2ebff4bcadf8117f (patch)
tree9661a690b01b079e0d25650b99da7c22efde8442 /builtin/name-rev.c
parent79cfe0c5c4920bf68da548ad0d5bcdb425ce8d5f (diff)
parente8b14d7e3fa5194fbc776cdd253b0b5403b2226d (diff)
downloadgit-c9de921848061db9316fe8dc2ebff4bcadf8117f.tar.gz
git-c9de921848061db9316fe8dc2ebff4bcadf8117f.tar.xz
Merge branch 'jc/maint-name-rev-all' into maint
* jc/maint-name-rev-all: name-rev --all: do not even attempt to describe non-commit object
Diffstat (limited to 'builtin/name-rev.c')
-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 31f5c1c97..e8862b5de 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);