summaryrefslogtreecommitdiff
path: root/t/t6023-merge-file.sh
diff options
context:
space:
mode:
authorAleksander Boruch-Gruszecki <aleksander.boruchgruszecki@gmail.com>2015-02-08 16:53:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-02-11 19:01:50 (GMT)
commit204a8ffe67d2b789a34a14a06618a24756f7d9a9 (patch)
treeae27dede5a5b4501c9afd7742154554a105b2d47 /t/t6023-merge-file.sh
parent3d8a54eb37d298c251c0b6823dc06935a611bc33 (diff)
downloadgit-204a8ffe67d2b789a34a14a06618a24756f7d9a9.zip
git-204a8ffe67d2b789a34a14a06618a24756f7d9a9.tar.gz
git-204a8ffe67d2b789a34a14a06618a24756f7d9a9.tar.bz2
merge-file: correctly open files when in a subdir
run_setup_gently() is called before merge-file. This may result in changing current working directory, which wasn't taken into account when opening a file for writing. Fix by prepending the passed prefix. Previous var is left so that error messages keep referring to the file from the user's working directory perspective. Signed-off-by: Aleksander Boruch-Gruszecki <aleksander.boruchgruszecki@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6023-merge-file.sh')
-rwxr-xr-xt/t6023-merge-file.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index 432f086..d0df869 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -69,7 +69,8 @@ test_expect_success 'works in subdirectory' '
cp new1.txt dir/a.txt &&
cp orig.txt dir/o.txt &&
cp new2.txt dir/b.txt &&
- ( cd dir && git merge-file a.txt o.txt b.txt )
+ ( cd dir && git merge-file a.txt o.txt b.txt ) &&
+ test_path_is_missing a.txt
'
cp new1.txt test.txt