Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:54

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 <redacted>
---

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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help