]> source.dussan.org Git - jgit.git/commit
ResolveMerger: don't try needlessly to delete directories 22/126222/4
authorThomas Wolf <thomas.wolf@paranor.ch>
Wed, 18 Jul 2018 07:47:32 +0000 (09:47 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Thu, 19 Jul 2018 10:38:28 +0000 (12:38 +0200)
commita9b54b026d22be9a42aec4cdc0ea168da7a300dd
tree96fe1596f5b6365eb65a31a055b48ddb08e691ea
parente4774f45c4190ee0c5ec4f5f575d9d4df1df4959
ResolveMerger: don't try needlessly to delete directories

Don't try to delete folders if the merger chooses THEIRS, but all of
BASE, OURS, and THEIRS contain the folder.

Add a test for rebase with auto-stash and subdirectories that
verifies this case. The needless directory deletion and reporting
such directories in getModifiedFiles() was the root cause of bug
536880.

Note even with this fix, bug 536880 will not be fixed in all cases
yet. There may still be cases where the set of modified files ends
up containing directories. This will be dealt with in EGit where
this set is used. (See https://git.eclipse.org/r/#/c/126242/ .)

Bug: 536880
Change-Id: I62b4571a1c1d4415934a6cb4270e0c8036deb2e9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java