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

[PATCH 5/6] Teach diff-tree-helper to handle unmerged paths.

From
Junio C Hamano <junkio@cox.net>
Date
Apr 27, 2005, 06:27 UTC
Message-ID
<7vk6moivjj.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vekcwkagr.fsf@assigned-by-dhcp.cox.net>

This patch teaches diff-tree-helper to call diff_unmrege() so that it can report unmerged paths to GIT_EXTERNAL_DIFF, instead of consuming it on its own.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

diff-tree-helper.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)

To be tested with the following:
    GIT_INDEX_FILE=junk
    export GIT_INDEX_FILE
    read-tree $(cat .git/HEAD)
    t1=$(write-tree)
    date >trash ; update-cache --add trash
    t2=$(write-tree)
    read-tree -m $(cat .git/HEAD) $t1 $t2
    update-cache --refresh
    ./show-diff | GIT_EXTERNAL_DIFF=echo ./diff-tree-helper

--- k/diff-tree-helper.c +++ l/diff-tree-helper.c

@@ -56,7 +56,7 @@ static int parse_diff_tree_output(const 
 
 	switch (*cp++) {
 	case 'U':
-		fprintf(stderr, "warning: unmerged path %s\n", cp+1);
+		diff_unmerge(cp + 1);
 		return WARNED_OURSELVES;
 	case '+':
 		old->file_valid = 0;
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 9 in “External diff interface for diff-cache and friends.”
  1. 0/6 External diff interface for diff-cache and friends.Junio C Hamano, Apr 27, 2005
  2. 1/6 Reworked external diff interface.Junio C Hamano, Apr 27, 2005
  3. 2/6 Reactivate show-diff patch generationJunio C Hamano, Apr 27, 2005
  4. 3/6 Add -p (patch) to diff-tree.Junio C Hamano, Apr 27, 2005
  5. 4/6 Add -p (patch) to diff-cache.Junio C Hamano, Apr 27, 2005
  6. 5/6 Teach diff-tree-helper to handle unmerged paths.Junio C Hamano, Apr 27, 2005
  7. 6/6 Alternative patch to diff-cache.cJunio C Hamano, Apr 27, 2005
  8. 7/6 Leftover bits.Junio C Hamano, Apr 27, 2005
  9. Linus TorvaldsApr 27, 2005

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.