]> git.scripts.mit.edu Git - git.git/blobdiff - t/t1508-at-combinations.sh
apply: reject input that touches outside the working area
[git.git] / t / t1508-at-combinations.sh
index ceb844985f97e9472ffcc3fe2f375912d126a4e8..078e1195dfa1625796fdbbf1b054ebf8a1ba2621 100755 (executable)
@@ -9,8 +9,11 @@ check() {
                if test '$2' = 'commit'
                then
                        git log -1 --format=%s '$1' >actual
-               else
+               elif test '$2' = 'ref'
+               then
                        git rev-parse --symbolic-full-name '$1' >actual
+               else
+                       git cat-file -p '$1' >actual
                fi &&
                test_cmp expect actual
        "
@@ -82,4 +85,14 @@ check HEAD ref refs/heads/old-branch
 check "HEAD@{1}" commit new-two
 check "@{1}" commit old-one
 
+test_expect_success 'create path with @' '
+       echo content >normal &&
+       echo content >fun@ny &&
+       git add normal fun@ny &&
+       git commit -m "funny path"
+'
+
+check "@:normal" blob content
+check "@:fun@ny" blob content
+
 test_done