Thread (20 messages) flat view 20 messages, 4 authors, 2016-06-15

Re: [PATCH jh/notes-merge-in-git-dir-worktree] fixup! t3310 on Windows

From: Johan Herland <hidden>
Date: 2016-06-15 22:53:18

On Wed, Mar 14, 2012 at 09:39, Johannes Sixt [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Johannes Sixt <redacted>

On Windows, a directory cannot be removed while it is the working
directory of a process. "git notes merge --commit" attempts to remove
.git/NOTES_MERGE_WORKTREE, but during the test the directory was still
"occupied" by the shell. Move the command out of the subshell to release
the directory.

Signed-off-by: Johannes Sixt <redacted>
---
 Feel free to squash this into 1/2.

 t/t3310-notes-merge-manual-resolve.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh
index d6d6ac6..6351877 100755
--- a/t/t3310-notes-merge-manual-resolve.sh
+++ b/t/t3310-notes-merge-manual-resolve.sh
@@ -565,9 +565,9 @@ test_expect_success 'switch cwd before committing notes merge' '
       (
               cd .git/NOTES_MERGE_WORKTREE &&
               echo "foo" > $(git rev-parse HEAD) &&
-               echo "bar" >> $(git rev-parse HEAD) &&
-               git notes merge --commit
+               echo "bar" >> $(git rev-parse HEAD)
       ) &&
+       git notes merge --commit &&
NAK. This defeats the entire purpose of this test. The bug that we're
trying to solve is exactly the situation where the user has changed
into the .git/NOTES_MERGE_WORKTREE directory, and invokes 'git notes
merge --commit' from within. We need to find a different solution for
this on Windows. Maybe we should just abort 'git notes merge
--commit/--abort' if the current directory is within
.git/NOTES_MERGE_WORKTREE (and we're on Windows)?


...Johan


-- 
Johan Herland, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help