X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fname-rev.c;h=1b374583c2751801dfae1d0d1861d28f81c7ad7b;hb=bd193f46b70fd3f8a55e2a8dcbb1fb2b4eec13d6;hp=7864056f1ee64b896a7378cc76555e2cf7c3fd89;hpb=9ee3d3774316f6a60c0618aa7a64fc7a59a8f338;p=git.git diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 7864056f1..1b374583c 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);