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

Re: BUG: mergetool fails on gitignore:d files

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
May 30, 2009, 16:38 UTC
Message-ID
<200905301838.09081.markus.heidelberg@web.de>
In-Reply-To
<e87cdfda0905300830t6b332533g9a4298f6b8005b9e@mail.gmail.com>
Erik Sandberg, 30.05.2009:
Show 13 quoted lines
> If a version-controlled file is ignored by git, and a conflict arises
> on the file, and I use mergetool to resolve the conflict, then
> mergetool fails with a message like:
> 
> The following paths are ignored by one of your .gitignore files:
> a
> Use -f if you really want to add them.
> 
> The problem disappears if I edit the git-mergetool script to always
> pass -f to "git add", but I'm not sure if that's the right fix; I have
> a vague feeling that "git-update-index --add" could be more correct.
> 
> I have attached a script that reproduces the problem.

The script would have been more readable if you haven't given both the file and the branch name as well as the file content and the commit message the same string "a".

Apart from that I wonder if your real repo also ignores the file 'a' although it is tracked in every branch. If so, why do you ignore it?

Markus
Previous: Erik SandbergNext: Jeff King
Message 2 of 5 in “BUG: mergetool fails on gitignore:d files”
  1. Erik SandbergMay 30, 2009
  2. Markus HeidelbergMay 30, 2009
  3. Jeff KingMay 30, 2009
  4. Jeff KingJun 1, 2009
  5. Junio C HamanoJun 1, 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.