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

Re: git add -p and unresolved conflicts

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2012, 15:10 UTC
Message-ID
<7vbongyd67.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CABPQNSYVXMxS3kugu1j=62ArJ_1saYYfMjJdZvqhjgPFGN=Eqw@mail.gmail.com>
Erik Faye-Lund <kusmabite@gmail.com> writes:
> I'm running git version 1.7.9.msysgit.0.390.g01fca.dirty, and I've
> noticed a puzzling behavior with "git add -p" on a conflicted file: it
> seems to simply spew the diff and exit the process.

Yeah, when I wrote the 'p'atch mode in "add--interactive", I wasn't interested at all in letting it be used on a conflicted path, so that is not a designed-in behaviour but merely whatever it happens to do. So at least it should not allow the user to pick a path that has conflicts in it.

What the behaviour for people who *do* want to use the patch mode for conflicted paths should be is a separate matter. As I said, I am not interested in it, so I wouldn't be the best person to design it.

I mildly suspect nobody would come up with a sane behaviour, but what would I know...

Previous: Erik Faye-LundNext: Matthieu Moy
Message 2 of 21 in “git add -p and unresolved conflicts”
  1. Erik Faye-LundMar 28, 2012
  2. Junio C HamanoMar 28, 2012
  3. Matthieu MoyMar 28, 2012
  4. Holger HellmuthMar 28, 2012
  5. Junio C HamanoMar 28, 2012
  6. Holger HellmuthMar 28, 2012
  7. Jeff KingMar 29, 2012
  8. Holger HellmuthMar 29, 2012
  9. Matthieu MoyMar 28, 2012
  10. Junio C HamanoMar 28, 2012
  11. Holger HellmuthMar 28, 2012
  12. Junio C HamanoMar 28, 2012
  13. Holger HellmuthMar 28, 2012
  14. Junio C HamanoMar 28, 2012
  15. Junio C HamanoMar 28, 2012
  16. Holger HellmuthMar 29, 2012
  17. Matthieu MoyMar 29, 2012
  18. Junio C HamanoMar 29, 2012
  19. Matthieu MoyMar 30, 2012
  20. Erik Faye-LundMar 28, 2012
  21. Junio C HamanoMar 28, 2012

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.