diff options
author | Jeff King <peff@peff.net> | 2009-02-13 19:26:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-14 03:20:44 +0100 |
commit | e9cc02f0e41fd5d2f51e3c3f2b4f8cfa9e434432 (patch) | |
tree | aded218cfeff8d691a0b2b68c027e2d099621ee4 /t/t1401-symbolic-ref.sh | |
parent | Remove redundant bit clears from diff_setup() (diff) | |
download | git-e9cc02f0e41fd5d2f51e3c3f2b4f8cfa9e434432.tar.xz git-e9cc02f0e41fd5d2f51e3c3f2b4f8cfa9e434432.zip |
symbolic-ref: allow refs/<whatever> in HEAD
Commit afe5d3d5 introduced a safety valve to symbolic-ref to
disallow installing an invalid HEAD. It was accompanied by
b229d18a, which changed validate_headref to require that
HEAD contain a pointer to refs/heads/ instead of just refs/.
Therefore, the safety valve also checked for refs/heads/.
As it turns out, topgit is using refs/top-bases/ in HEAD,
leading us to re-loosen (at least temporarily) the
validate_headref check made in b229d18a. This patch does the
corresponding loosening for the symbolic-ref safety valve,
so that the two are in agreement once more.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-x | t/t1401-symbolic-ref.sh | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh index 569f34177d..7fa5f5b22a 100755 --- a/t/t1401-symbolic-ref.sh +++ b/t/t1401-symbolic-ref.sh @@ -27,11 +27,6 @@ test_expect_success 'symbolic-ref refuses non-ref for HEAD' ' ' reset_to_sane -test_expect_success 'symbolic-ref refuses non-branch for HEAD' ' - test_must_fail git symbolic-ref HEAD refs/foo -' -reset_to_sane - test_expect_success 'symbolic-ref refuses bare sha1' ' echo content >file && git add file && git commit -m one test_must_fail git symbolic-ref HEAD `git rev-parse HEAD` |