X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fname-rev.c;h=1b374583c2751801dfae1d0d1861d28f81c7ad7b;hb=bd193f46b70fd3f8a55e2a8dcbb1fb2b4eec13d6;hp=31f5c1c971381a9490b717e0413ee9a40260ef39;hpb=eb4e67288bb9d66fb46092fa30d72c4bdded0c2a;p=git.git diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 31f5c1c97..1b374583c 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -172,7 +172,9 @@ static void show_name(const struct object *obj, } static char const * const name_rev_usage[] = { - "git name-rev [options] ( --all | --stdin | ... )", + "git name-rev [options] ...", + "git name-rev [options] --all", + "git name-rev [options] --stdin", NULL }; @@ -289,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);