Re: [PATCH v3 3/4] refs: make refs/worktree/* per-worktree
On Wed, Aug 12, 2015 at 5:57 PM, David Turner <dturner@twopensource.com> wrote:
Show 11 quoted lines
> diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
> index 93605f4..28e6dff 100755
> --- a/t/t0060-path-utils.sh
> +++ b/t/t0060-path-utils.sh
> +test_expect_success 'handle per-worktree refs in refs/worktree' '
> + git commit --allow-empty -m "initial commit" &&
> + git worktree add -b branch worktree &&
> + (
> + cd worktree &&
> + git commit --allow-empty -m "test commit" &&
> + git for-each-ref | test_must_fail grep refs/worktree &&
>From t/README:
On the other hand, don't use test_must_fail for running regular
platform commands; just use '! cmd'. We are not in the business
of verifying that the world given to us sanely works.
Show 10 quoted lines
> + git update-ref refs/worktree/something HEAD &&
> + git rev-parse refs/worktree/something >../worktree-head &&
> + git for-each-ref | grep refs/worktree/something
> + ) &&
> + test_path_is_missing .git/refs/worktree &&
> + test_must_fail git rev-parse refs/worktree/something &&
> + git update-ref refs/worktree/something HEAD &&
> + git rev-parse refs/worktree/something >main-head &&
> + ! test_cmp main-head worktree-head
> +'