peel_onion(): add support for <rev>^{tag}
[gitweb.git] / sha1_name.c
index 65ad066d9bb4efd9b61142b40d790bac9543de1d..6dc496deb002c553dd48295949ac19bf08b0cb8e 100644 (file)
@@ -679,6 +679,8 @@ static int peel_onion(const char *name, int len, unsigned char *sha1)
        sp++; /* beginning of type name, or closing brace for empty */
        if (!strncmp(commit_type, sp, 6) && sp[6] == '}')
                expected_type = OBJ_COMMIT;
+       else if (!strncmp(tag_type, sp, 3) && sp[3] == '}')
+               expected_type = OBJ_TAG;
        else if (!strncmp(tree_type, sp, 4) && sp[4] == '}')
                expected_type = OBJ_TREE;
        else if (!strncmp(blob_type, sp, 4) && sp[4] == '}')