diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-15 15:51:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-15 15:51:05 -0800 |
commit | e8b14d7e3fa5194fbc776cdd253b0b5403b2226d (patch) | |
tree | c38ef89ed05d789d7708833a1baa8c84215cf2ef | |
parent | e923eaeb901ff056421b9007adcbbce271caa7b6 (diff) | |
download | git-e8b14d7e3fa5194fbc776cdd253b0b5403b2226d.tar.gz |
name-rev --all: do not even attempt to describe non-commit objectjc/maint-name-rev-all
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 <gitster@pobox.com>
-rw-r--r-- | builtin-name-rev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-name-rev.c b/builtin-name-rev.c index 06a38ac8c1..eb8bf70c70 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); |