Commit 9969454
committed
diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"
The combined diff machinery can be used to compare:
- a merge commit with its parent commits;
- a working-tree file with multiple stages in an unmerged index; or
- a working-tree file with the HEAD and the index.
The internal function combine-diff.c:show_patch_diff() checked if it needs
to read the "result" from the working tree by looking at the object name
of the result --- if it is null_sha1, it read from the working tree.
This mistook a merge that records a deletion as the conflict resolution
as if it is a cue to read from the working tree. Pass this information
explicitly from the caller instead.
Noticed and reported by Johan Herland.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 206af7c commit 9969454
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
| 685 | + | |
| 686 | + | |
686 | 687 | | |
687 | 688 | | |
688 | 689 | | |
| |||
691 | 692 | | |
692 | 693 | | |
693 | 694 | | |
694 | | - | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
957 | 963 | | |
958 | 964 | | |
959 | 965 | | |
| |||
967 | 973 | | |
968 | 974 | | |
969 | 975 | | |
970 | | - | |
| 976 | + | |
971 | 977 | | |
972 | 978 | | |
973 | 979 | | |
| |||
1035 | 1041 | | |
1036 | 1042 | | |
1037 | 1043 | | |
1038 | | - | |
| 1044 | + | |
1039 | 1045 | | |
1040 | 1046 | | |
1041 | 1047 | | |
| |||
0 commit comments