Skip to content

Commit 43176d1

Browse files
committed
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
2 parents 6d1cdad + e8b14d7 commit 43176d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/name-rev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
289289
max = get_max_object_index();
290290
for (i = 0; i < max; i++) {
291291
struct object *obj = get_indexed_object(i);
292-
if (!obj)
292+
if (!obj || obj->type != OBJ_COMMIT)
293293
continue;
294294
show_name(obj, NULL,
295295
always, allow_undefined, data.name_only);

0 commit comments

Comments
 (0)