]> source.dussan.org Git - jgit.git/commit
DirCacheEditor: Replace file-with-tree and tree-with-file 29/63329/5
authorShawn Pearce <sop@google.com>
Mon, 28 Dec 2015 19:43:07 +0000 (11:43 -0800)
committerShawn Pearce <spearce@spearce.org>
Tue, 29 Dec 2015 19:33:39 +0000 (11:33 -0800)
commitb71ba69410db5e50dd10c5c40e96699c9de7e5e8
treeade2fc61b6f11425e5508b88bc0d814650358042
parent3776b14ab45ca1daf0771fa1a8245bc097ec2e12
DirCacheEditor: Replace file-with-tree and tree-with-file

If a PathEdit tries to store a file where a subtree was, or a subtree
where a file was, replace the entry in the DirCache with the new
name(s).  This supports switching between file and tree entry types
using a DirCacheEditor.

Add new unit tests to cover the conditions where these can happen.

Change-Id: Ie843d9388825f9e3d918a5666aa04e47cd6306e7
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java