From 204a8ffe67d2b789a34a14a06618a24756f7d9a9 Mon Sep 17 00:00:00 2001 From: Aleksander Boruch-Gruszecki Date: Sun, 8 Feb 2015 17:53:53 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- t/t6023-merge-file.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/t6023-merge-file.sh') diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh index 432f086c06..d0df869001 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 -- cgit v1.2.3