Thread (15 messages) 15 messages, 4 authors, 2016-06-15

Re: [PATCH v3 3/4] refs: make refs/worktree/* per-worktree

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:06:10

On Wed, Aug 12, 2015 at 5:57 PM, David Turner [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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 &&
s/test_must_fail/!/
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.
+               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
+'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help