summaryrefslogtreecommitdiff
path: root/t/t1508-at-combinations.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1508-at-combinations.sh')
-rwxr-xr-xt/t1508-at-combinations.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
index ceb844985f..078e1195df 100755
--- a/t/t1508-at-combinations.sh
+++ b/t/t1508-at-combinations.sh
@@ -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