git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Aleksander Boruch-Gruszecki
Message 2 of 2 in “merge-file: correctly open files when in a subdir”
  1. merge-file: correctly open files when in a subdirAleksander Boruch-Gruszecki, Feb 8, 2015
  2. Duy NguyenFeb 9, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.