BUG: mergetool fails on gitignore:d files
- From
- Erik Sandberg <mandolaerik@gmail.com>
- Date
- May 30, 2009, 15:30 UTC
- Message-ID
- <e87cdfda0905300830t6b332533g9a4298f6b8005b9e@mail.gmail.com>
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.