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

Re: first-class conflicts?

From
Theodore Ts'o <tytso@mit.edu>
Date
Nov 7, 2023, 00:50 UTC
Message-ID
<ZUmJyFs7z7wdmLVK@mit.edu>
In-Reply-To
<Gr..Y5kkszDx87g@idiomdrottning.org>
On Mon, Nov 06, 2023 at 10:45:03PM +0000, Sandra Snan wrote:
Show 11 quoted lines
> Randall, thank you for that.
> 
> I just have sometimes wish git could be a little more aware of them beyond
> just storing them with ASCII art in the files themselves (and alerting /
> warning when they happen but I often can't properly see those warnings flash
> by so I end up having to search for the conflict markers manually). So if
> conflicts are a thing that *can* happen, it'd be better if vc could know
> about them which would make some of the rebases simpler as in jj. That
> doesn't mean we wanna adopt the jj workflow of deliberately checking in
> conflicts (not even locally), just be able to deal with them better if it
> does happen.
Well, if you miss them, "git status" does show that there are conflicts:
   Unmerged paths:
     (use "git add <file>..." to mark resolution)
           both modified:   version.h

And if you attempt to commit the merge without resolving the conflicts, git won't let you:

   error: Committing is not possible because you have unmerged files.
   hint: Fix them up in the work tree, and then use 'git add/rm <file>'
   hint: as appropriate to mark resolution and make a commit.

So it's hard to miss the indications of the content conflict, because if you try to commit without resolving them, it's not a warning, it's an outright error.

Cheers,
					- Ted
Previous: Sandra SnanNext: Junio C Hamano
Message 8 of 25 in “first-class conflicts?”
  1. Sandra SnanNov 6, 2023
  2. Dragan SimicNov 6, 2023
  3. Sandra SnanNov 6, 2023
  4. rsbecker@nexbridge.comNov 6, 2023
  5. Sandra SnanNov 6, 2023
  6. Phillip WoodNov 7, 2023
  7. Sandra SnanNov 7, 2023
  8. Theodore Ts'oNov 7, 2023
  9. Junio C HamanoNov 11, 2023
  10. Sandra SnanNov 11, 2023
  11. Theodore Ts'oNov 12, 2023
  12. Junio C HamanoNov 12, 2023
  13. Elijah NewrenNov 7, 2023
  14. Dragan SimicNov 7, 2023
  15. Sandra SnanNov 7, 2023
  16. Phillip WoodNov 7, 2023
  17. Martin von ZweigbergkNov 7, 2023
  18. Elijah NewrenNov 8, 2023
  19. Martin von ZweigbergkNov 8, 2023
  20. Elijah NewrenNov 10, 2023
  21. Martin von ZweigbergkNov 12, 2023
  22. phillip.wood123@gmail.comNov 9, 2023
  23. Elijah NewrenNov 8, 2023
  24. Phillip WoodNov 9, 2023
  25. Elijah NewrenNov 10, 2023

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.