X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fname-rev.c;h=e8862b5de2e263ca0e1ccee8c69b3881816f41c5;hb=f026358ef20e0c252388a41fcc8eff125b00927c;hp=31f5c1c971381a9490b717e0413ee9a40260ef39;hpb=5ce3258122939f93a927c75d308c1c34038f0386;p=git.git 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);