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

Re: commiting while the current version is in conflict

From
Richard Hartmann <richih.mailinglist@gmail.com>
Date
Oct 16, 2008, 23:26 UTC
Message-ID
<2d460de70810161626n4f4c4489k489b20f2e6cce186@mail.gmail.com>
In-Reply-To
<20081016230035.GC9877@spearce.org>
On Fri, Oct 17, 2008 at 01:00, Shawn O. Pearce <spearce@spearce.org> wrote:
> The sample pre-commit hook checks for these.  Its really hande to
> have enabled.
Thanks.
> and merge conflicts are "resolved" by you running "git add $path"
> after you have finished fixing that path.

True, git add is an implicit resolving, I did not think about it this way. Personally, I think that git should break at this point, but that's just me.

The obvious fix would be a pre-add hook. Does anyone else think this would make sense?

Judging from the code in the pre-commit script, git does not keep conflict information in its metadata cache, but tries to guess conflicts from the file's contents/ This seems to be a strange thing to do, imo. What's the reason for this?

Richard
Previous: Shawn O. PearceNext: Avery Pennarun
Message 4 of 10 in “commiting while the current version is in conflict”
  1. Richard HartmannOct 16, 2008
  2. Miklos VajnaOct 16, 2008
  3. Shawn O. PearceOct 16, 2008
  4. Richard HartmannOct 16, 2008
  5. Avery PennarunOct 17, 2008
  6. Richard HartmannOct 16, 2008
  7. Shawn O. PearceOct 16, 2008
  8. Richard HartmannOct 16, 2008
  9. Jakub NarebskiOct 16, 2008
  10. Richard HartmannOct 17, 2008

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.