rev-parse: let some options run outside repository
[gitweb.git] / builtin / tag.c
index 8db8c87e57ef05edadce8de19316572498c40753..1705c9466546c7de52b12d3fbafbbe7b6d43cf4e 100644 (file)
@@ -44,11 +44,11 @@ static int list_tags(struct ref_filter *filter, struct ref_sorting *sorting, con
        if (!format) {
                if (filter->lines) {
                        to_free = xstrfmt("%s %%(contents:lines=%d)",
-                                         "%(align:15)%(refname:short)%(end)",
+                                         "%(align:15)%(refname:strip=2)%(end)",
                                          filter->lines);
                        format = to_free;
                } else
-                       format = "%(refname:short)";
+                       format = "%(refname:strip=2)";
        }
 
        verify_ref_format(format);