On Thu, May 22, 2014 at 4:11 PM, Pasha Bolokhov
<pasha.bolok...@gmail.com> wrote:
> diff --git a/t/t2205-add-gitdir.sh b/t/t2205-add-gitdir.sh
> new file mode 100755
> index 0000000..3c6b853
> --- /dev/null
> +++ b/t/t2205-add-gitdir.sh
> @@ -0,0 +1,61 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2014 Pasha Bolokhov
> +#
> +
> +test_description='alternative repository path specified by --git-dir is 
> ignored by add and status'
> +
> +. ./test-lib.sh
> +
> +test_expect_success "setup" '
> +       git --git-dir=meta init &&
> +       for f in a b c d
> +       do
> +               echo "DATA" > "$f" || exit 1

On this project, it's customary to say 'foo >bar' (no whitespace after
'>'). Ditto for the rest of the file.

> +       done &&
> +       mkdir subdir1 &&
> +       for f in e f g h
> +       do
> +               echo "MORE DATA" > "subdir1/$f" || exit 1
> +       done &&
> +       mkdir subdir1/meta &&
> +       echo "EVEN more Data" > subdir1/meta/aa &&
> +       mkdir subdir1/ssubdir subdir1/ssubdir/meta &&
> +       echo "So much more data" > subdir1/ssubdir/meta/aaa
> +'
> +
> +test_expect_success "'git status' acknowledges files 'meta' if repository is 
> not within work tree" '
> +       test_might_fail rm -rf meta/ &&
> +       (
> +               cd subdir1 &&
> +               git --git-dir=../meta init

Broken &&-chain.

> +               git --git-dir=../meta --work-tree=. status --porcelain > 
> status2.out &&
> +               test_might_fail grep meta status2.out > out2 &&
> +               test -s out2
> +       )
> +'
> +
> +test_done
> --
> 1.9.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to