summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e923eae)
raw | patch | inline | side by side (parent: e923eae)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 15 Nov 2011 23:51:05 +0000 (15:51 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 15 Nov 2011 23:51:05 +0000 (15:51 -0800) |
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>
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>
builtin-name-rev.c | patch | blob | history |
diff --git a/builtin-name-rev.c b/builtin-name-rev.c
index 06a38ac8c10126085e6477c205d450da089faae2..eb8bf70c7001b97e3403e2d0c980c437058a459f 100644 (file)
--- a/builtin-name-rev.c
+++ b/builtin-name-rev.c
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);