aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-06 10:49:57 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-06 10:49:57 -0700
commit76f4f74a444cdb3d43950c099da60e5d1ad36305 (patch)
treeef35069c72b7a8a3ba57e9d2ad93ae66a161b440 /t
parent12b99a3598bddfb26efd188ffac6f0e283f02d5a (diff)
parent7cf16a14f5c070f7b14cf28023769450133172ae (diff)
downloadgit-76f4f74a444cdb3d43950c099da60e5d1ad36305.tar.gz
git-76f4f74a444cdb3d43950c099da60e5d1ad36305.tar.xz
Merge branch 'mg/alias-expose-prefix'
* mg/alias-expose-prefix: handle_alias: provide GIT_PREFIX to !alias t1020: test !alias in subdirectory
Diffstat (limited to 't')
-rwxr-xr-xt/t1020-subdirectory.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 1fd187c5e..ddc3921ac 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -118,6 +118,27 @@ test_expect_success 'alias expansion' '
git ss
)
'
+
+test_expect_success '!alias expansion' '
+ pwd >expect &&
+ (
+ git config alias.test !pwd &&
+ cd dir &&
+ git test >../actual
+ ) &&
+ test_cmp expect actual
+'
+
+test_expect_success 'GIT_PREFIX for !alias' '
+ printf "dir/" >expect &&
+ (
+ git config alias.test "!sh -c \"printf \$GIT_PREFIX\"" &&
+ cd dir &&
+ git test >../actual
+ ) &&
+ test_cmp expect actual
+'
+
test_expect_success 'no file/rev ambiguity check inside .git' '
git commit -a -m 1 &&
(