diff options
-rw-r--r-- | builtin/name-rev.c | 2 |
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); |