summaryrefslogtreecommitdiff
path: root/t/t3308-notes-merge.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-10-06 14:38:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-07 01:31:52 (GMT)
commitf2515d919e66d4711e50dcc774c47393ba1704ab (patch)
treeb9ed77210e08fef1f7da6fc8a4eaded547c1503e /t/t3308-notes-merge.sh
parent217f2767cbcb562872437eed4dec62e00846d90c (diff)
downloadgit-f2515d919e66d4711e50dcc774c47393ba1704ab.zip
git-f2515d919e66d4711e50dcc774c47393ba1704ab.tar.gz
git-f2515d919e66d4711e50dcc774c47393ba1704ab.tar.bz2
t3308: create a real ref directory/file conflict
A test in t3308 wants to make sure that we don't accidentally merge into "refs/notes/dir" when it exists as a directory, so it does: mkdir .git/refs/notes/dir git -c core.notesRef=refs/notes/dir merge ... and expects the second command to fail. But that understimates the refs code, which is smart enough to remove useless directories in the refs hierarchy. The test succeeded only because of a bug which prevented resolving refs/notes/dir for writing, even though an actual ref update would succeed. In preparation for fixing that bug, let's switch to creating a real ref in refs/notes/dir, which is a more realistic situation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3308-notes-merge.sh')
-rwxr-xr-xt/t3308-notes-merge.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh
index 19aed7e..ab946a5 100755
--- a/t/t3308-notes-merge.sh
+++ b/t/t3308-notes-merge.sh
@@ -79,7 +79,7 @@ test_expect_success 'fail to merge empty notes ref into empty notes ref (z => y)
test_expect_success 'fail to merge into various non-notes refs' '
test_must_fail git -c "core.notesRef=refs/notes" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/" notes merge x &&
- mkdir -p .git/refs/notes/dir &&
+ git update-ref refs/notes/dir/foo HEAD &&
test_must_fail git -c "core.notesRef=refs/notes/dir" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/dir/" notes merge x &&
test_must_fail git -c "core.notesRef=refs/heads/master" notes merge x &&