From: Junio C Hamano Date: Tue, 15 Nov 2011 23:51:05 +0000 (-0800) Subject: name-rev --all: do not even attempt to describe non-commit object X-Git-Tag: v1.7.7.4~1^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8b14d7e3fa5194fbc776cdd253b0b5403b2226d;p=git.git name-rev --all: do not even attempt to describe non-commit object This even dates back to the very beginning of "git name-rev"; it does not make much sense to dump all objects in the repository and label non-commits as "undefined". Signed-off-by: Junio C Hamano --- diff --git a/builtin-name-rev.c b/builtin-name-rev.c index 06a38ac8c..eb8bf70c7 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);