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 12, 2023, 15:21 UTC
Message-ID
<20231112152143.GD35991@mit.edu>
In-Reply-To
<xmqqh6ltrs6t.fsf@gitster.g>
On Sat, Nov 11, 2023 at 10:31:54AM +0900, Junio C Hamano wrote:
Show 11 quoted lines
> Correct but with a caveat: it is too easy for lazy folks to
> circumvent the safety by mistake with "commit -a".
> 
> I wonder if it would help users to add a new configuration option
> for those who want to live safer that tells "commit -a" to leave
> unmerged paths alone and require the unmerged paths to be added
> explicitly (which may have to extend to cover things like "add -u"
> and "add .").
> 
> Perhaps not.  I often find myself doing "git add -u" after resolving
> conflicts and re-reading the result, without an explicit pathspec.

Maybe the configuration option would also forbit "git add -u" from adding diffs with conflict markers unless --force is added?

I dunno. I personally wouldn't use it myself, because I've always made a point of running "git diff", or "git status", and almost always, a command like "make -j16 && make -j16 check" (or an aliased equivalent) before commiting a merge.

But that's because I'm a paranoid s.o.b. and in my long career, I've learned is that "you can't be paranoid enough", and "hope is not a strategy". :-)

					- Ted
Previous: Sandra SnanNext: Junio C Hamano
Message 11 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.