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

Re: git mergetool from next not working in subdirectory

From
Charles Bailey <charles@hashpling.org>
Date
Jan 30, 2009, 14:06 UTC
Message-ID
<20090130140615.GA26321@hashpling.org>
In-Reply-To
<glutv9$4b1$1@ger.gmane.org>
On Fri, Jan 30, 2009 at 02:05:45PM +0100, Jonas Flodén wrote:
Show 10 quoted lines
> ~/src/rep/subdir $ git mergetool
> Merging the files: a/b/file.c
> 
> git checkout-index: subdir/subdir/a/b/file.c is not in the cache
> git checkout-index: subdir/subdir/a/b/file.c is not in the cache
> git checkout-index: subdir/subdir/a/b/file.c is not in the cache
> Normal merge conflict for 'a/b/file.c':
>   {local}: modified
> 
>   {remote}: modified

Oh bother. I know exactly what this is. ls-files -u shows paths relative to the work tree root, whereas checkout-index responds to relative paths. Essentially the "$prefix" needs to come out of the calls to the new checkout_staged_file shell function.

This is the bad commit 0ec7b6c26dad51f690cd985d4a5357634123c4b7

I can patch this (and more importantly add a test for this) tonight if nobody beats me to it.

-- 
Charles Bailey
http://ccgi.hashpling.plus.com/blog/
Previous: Johannes GilgerNext: Charles Bailey
Message 3 of 8 in “git mergetool from next not working in subdirectory”
  1. Jonas FlodénJan 30, 2009
  2. Johannes GilgerJan 30, 2009
  3. Charles BaileyJan 30, 2009
  4. Quick and dirty mergetool fixCharles Bailey, Jan 30, 2009
  5. Jonas FlodénJan 30, 2009
  6. Quick and dirty mergetool fix - take 2Charles Bailey, Jan 30, 2009
  7. Charles BaileyJan 30, 2009
  8. Jonas FlodénJan 30, 2009

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.