[EGIT PATCH 1/2] Fix merge of subtrees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subtrees are sometimes lost in creating the active diff
MergedTree.

Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
---

 .../src/org/spearce/jgit/lib/MergedTree.java       |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/MergedTree.java b/org.spearce.jgit/src/org/spearce/jgit/lib/MergedTree.java
index 58da5cf..9aba575 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/MergedTree.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/MergedTree.java
@@ -200,7 +200,7 @@ public class MergedTree {
 
 		if (cmp <= 0) {
 		    newMerged[pos + srcId] = thisEntry;
-		    if (thisEntry instanceof Tree) {
+		    if (thisEntry instanceof Tree && !mergeCurrentTree) {
 			if (srcId == 0) {
 			    mergeCurrentTree = true;
 			} else if (srcId == 1) {
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]