Merge branch 'sg/diff-multiple-identical-renames' into maint
[gitweb.git] / t / t0001-init.sh
index f91bbcfc853a47e0a314160b79fc4816178f1723..a5b9e7a4c7e85a2f09718ee7618ae6fb48c600fe 100755 (executable)
@@ -87,6 +87,21 @@ test_expect_success 'plain nested in bare through aliased command' '
        check_config bare-ancestor-aliased.git/plain-nested/.git false unset
 '
 
+test_expect_success 'No extra GIT_* on alias scripts' '
+       write_script script <<-\EOF &&
+       env |
+               sed -n \
+                       -e "/^GIT_PREFIX=/d" \
+                       -e "/^GIT_TEXTDOMAINDIR=/d" \
+                       -e "/^GIT_/s/=.*//p" |
+               sort
+       EOF
+       ./script >expected &&
+       git config alias.script \!./script &&
+       ( mkdir sub && cd sub && git script >../actual ) &&
+       test_cmp expected actual
+'
+
 test_expect_success 'plain with GIT_WORK_TREE' '
        mkdir plain-wt &&
        test_must_fail env GIT_WORK_TREE="$(pwd)/plain-wt" git init plain-wt