diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 31f5c1c971381a9490b717e0413ee9a40260ef39..1b374583c2751801dfae1d0d1861d28f81c7ad7b 100644 (file)
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
}
static char const * const name_rev_usage[] = {
}
static char const * const name_rev_usage[] = {
- "git name-rev [options] ( --all | --stdin | <commit>... )",
+ "git name-rev [options] <commit>...",
+ "git name-rev [options] --all",
+ "git name-rev [options] --stdin",
NULL
};
NULL
};
max = get_max_object_index();
for (i = 0; i < max; i++) {
struct object *obj = get_indexed_object(i);
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);
continue;
show_name(obj, NULL,
always, allow_undefined, data.name_only);