Re: [PATCH] merge-file: correctly open files when in a subdir
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 9, 2015, 10:06 UTC
- Message-ID
- <CACsJy8Abyi00UeDBWCoz6_+KE=k1-KkZCw8yww_g2pWbB+RYqg@mail.gmail.com>
- In-Reply-To
- <CAPHKiG7yP=QZBVdDbyQp=uyMX0EsmUqgO-LO8pscn7hcbP0RCw@mail.gmail.com>
On Sun, Feb 8, 2015 at 11:53 PM, Aleksander Boruch-Gruszecki <aleksander.boruchgruszecki@gmail.com> wrote:
Show 7 quoted lines
> 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.
Sounds about right. Thomas Rast fixed something similar in 55846b9 (merge-file: correctly find files when called in subdir - 2010-10-17) but he missed this part :-D. Perhaps a test case in t/t6023-merge-file.sh to prove this patch is working?
-- Duy