diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-21 16:57:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 16:57:51 +0300 |
commit | 45dda3a2dc7f387aa344d8f0674e8e6680a68abc (patch) | |
tree | ed776f86422e7b683b0bbdc6edf97615cde20bb7 /t | |
parent | e3c18aa35bf619e36efdea2f495756bcab597b8b (diff) | |
parent | ffd04e92e2c512cbbcb99526b064af302b443cb2 (diff) |
Merge branch 'js/diff-notice-has-drive-prefix' into maint
Under certain circumstances, "git diff D:/a/b/c D:/a/b/d" on
Windows would strip initial parts from the paths because they
were not recognized as absolute, which has been corrected.
* js/diff-notice-has-drive-prefix:
diff: don't attempt to strip prefix from absolute Windows paths
Diffstat (limited to 't')
-rwxr-xr-x | t/t4053-diff-no-index.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh index 453e6c35eb..6e0dd6f9e5 100755 --- a/t/t4053-diff-no-index.sh +++ b/t/t4053-diff-no-index.sh @@ -127,4 +127,14 @@ test_expect_success 'diff --no-index from repo subdir respects config (implicit) test_cmp expect actual.head ' +test_expect_success 'diff --no-index from repo subdir with absolute paths' ' + cat <<-EOF >expect && + 1 1 $(pwd)/non/git/{a => b} + EOF + test_expect_code 1 \ + git -C repo/sub diff --numstat \ + "$(pwd)/non/git/a" "$(pwd)/non/git/b" >actual && + test_cmp expect actual +' + test_done |