get_ref_dir(): require that the dirname argument ends in '/'
[gitweb.git] / git-request-pull.sh
index 64960d65a1c2bf3c260c8fd46c4b298ae870679f..e6438e24c7c787b55428a48eca9461d772db7ee6 100755 (executable)
@@ -63,7 +63,7 @@ die "fatal: No commits in common between $base and $head"
 find_matching_ref='
        sub abbr {
                my $ref = shift;
-               if ($ref =~ s|refs/heads/|| || $ref =~ s|refs/tags/||) {
+               if ($ref =~ s|^refs/heads/|| || $ref =~ s|^refs/tags/|tags/|) {
                        return $ref;
                } else {
                        return $ref;