Re: [PATCH] path_treatment: also ignore $GIT_DIR if it's not .git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 1, 2013 at 2:04 PM, Dennis Kaarsemaker
<dennis@xxxxxxxxxxxxxxx> wrote:
> diff --git a/t/t7508-status.sh b/t/t7508-status.sh
> index c987b5e..2bd7ef1 100755
> --- a/t/t7508-status.sh
> +++ b/t/t7508-status.sh
> @@ -198,6 +198,13 @@ test_expect_success 'status -s' '
>
>  '
>
> +test_expect_success 'status -s with non-standard $GIT_DIR' '
> +       mv .git .foo &&
> +       GIT_DIR=.foo git status -s >output &&
> +       test_cmp expect output &&
> +       mv .foo .git

If test_cmp returns a failure status, the following 'mv' command will
never be invoked, thus all subsequent tests in the script will fail
since the .git directory will be missing. Instead, use
test_when_finished to restore .git from .foo.

> +'
> +
>  test_expect_success 'status with gitignore' '
>         {
>                 echo ".gitignore" &&
> --
> 1.8.5-386-gb78cb96
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]