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

[PATCH] merge-tree: fix typo in "both changed identically"

From
John Keeping <john@keeping.me.uk>
Date
Apr 27, 2013, 13:03 UTC
Message-ID
<51cbc79a9b250544a8365980d078601dfcd2b782.1367067799.git.john@keeping.me.uk>

Commit aacecc3 (merge-tree: don't print entries that match "local" - 2013-04-07) had a typo causing the "same in both" check to be incorrect and check if both the base and "their" versions are empty instead of checking that both the "our" and "their" versions are empty. Fix this.

Reported-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: John Keeping <john@keeping.me.uk>
---
 builtin/merge-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index ed25d81..ec49917 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -302,7 +302,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
 static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *entry, struct traverse_info *info)
 {
 	/* Same in both? */
-	if (same_entry(entry+1, entry+2) || both_empty(entry+0, entry+2)) {
+	if (same_entry(entry+1, entry+2) || both_empty(entry+1, entry+2)) {
 		/* Modified, added or removed identically */
 		resolve(info, NULL, entry+1);
 		return mask;
-- 
1.8.2.1.715.gb260f47
Next: René Scharfe
Message 1 of 5 in “merge-tree: fix typo in "both changed identically"”
  1. merge-tree: fix typo in "both changed identically"John Keeping, Apr 27, 2013
  2. René ScharfeApr 27, 2013
  3. John KeepingApr 27, 2013
  4. merge-tree: fix typo in "both changed identically"John Keeping, Apr 27, 2013
  5. Junio C HamanoApr 28, 2013

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.