gitweb: Hyperlink target of symbolic link in "tree" view (if possible)
[gitweb.git] / builtin-show-ref.c
index 9ae3d08546c74a579e9bb13285424290b4449d4d..073979855b30b72363ed8116288b7bbbb2f0ff74 100644 (file)
@@ -67,8 +67,10 @@ static int show_ref(const char *refname, const unsigned char *sha1, int flag, vo
                return 0;
 
        if ((flag & REF_ISPACKED) && !peel_ref(refname, peeled)) {
-               hex = find_unique_abbrev(peeled, abbrev);
-               printf("%s %s^{}\n", hex, refname);
+               if (!is_null_sha1(peeled)) {
+                       hex = find_unique_abbrev(peeled, abbrev);
+                       printf("%s %s^{}\n", hex, refname);
+               }
        }
        else {
                obj = parse_object(sha1);