Code

Merge branch 'jn/gitweb-unspecified-action' into maint-1.7.8
[git.git] / builtin / name-rev.c
index 7864056f1ee64b896a7378cc76555e2cf7c3fd89..1b374583c2751801dfae1d0d1861d28f81c7ad7b 100644 (file)
@@ -291,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);