Git fork

Merge branch 'jk/diff-release-filespec-fix'

Running "git diff" while allowing external diff in a state with
unmerged paths used to segfault, which has been corrected.

* jk/diff-release-filespec-fix:
t7800: simplify difftool test
diff: allow passing NULL to diff_free_filespec_data()

+16
+3
diff.c
··· 4115 4116 void diff_free_filespec_data(struct diff_filespec *s) 4117 { 4118 diff_free_filespec_blob(s); 4119 FREE_AND_NULL(s->cnt_data); 4120 }
··· 4115 4116 void diff_free_filespec_data(struct diff_filespec *s) 4117 { 4118 + if (!s) 4119 + return; 4120 + 4121 diff_free_filespec_blob(s); 4122 FREE_AND_NULL(s->cnt_data); 4123 }
+13
t/t7800-difftool.sh
··· 728 git difftool --dir-diff --extcmd ls 729 ' 730 731 test_expect_success 'outside worktree' ' 732 echo 1 >1 && 733 echo 2 >2 &&
··· 728 git difftool --dir-diff --extcmd ls 729 ' 730 731 + test_expect_success 'difftool --cached with unmerged files' ' 732 + test_when_finished git reset --hard && 733 + 734 + test_commit conflicting && 735 + test_commit conflict-a conflict.t a && 736 + git reset --hard conflicting && 737 + test_commit conflict-b conflict.t b && 738 + test_must_fail git merge conflict-a && 739 + 740 + git difftool --cached --no-prompt >output && 741 + test_must_be_empty output 742 + ' 743 + 744 test_expect_success 'outside worktree' ' 745 echo 1 >1 && 746 echo 2 >2 &&