git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH 1/2] Fix merge of subtrees

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Jan 27, 2007, 23:57 UTC
Message-ID
<20070127235718.26097.74542.stgit@lathund.dewire.com>

Subtrees are sometimes lost in creating the active diff MergedTree.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../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) {
Next: Robin Rosenberg
Message 1 of 3 in “Fix merge of subtrees”
  1. 1/2 Fix merge of subtreesRobin Rosenberg, Jan 27, 2007
  2. 2/2 Show 'StGit/Git' as project decorationRobin Rosenberg, Jan 27, 2007
  3. Shawn O. PearceJan 29, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.