summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-11-18 11:30:02 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-11-18 11:30:02 -0800
commit4c00c852b3f2596f246811ca933eef357183581b (patch)
tree9124be28ac775505f8627c71d8af7bf6c879639b /builtin
parentdo not let git_path clobber errno when reporting errors (diff)
parentGit 1.7.7.4 (diff)
downloadtgif-4c00c852b3f2596f246811ca933eef357183581b.tar.xz
Sync with 1.7.7.4
Diffstat (limited to 'builtin')
-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 7864056f1e..1b374583c2 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -291,7 +291,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);