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

Re: Files different for me

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 25, 2009, 20:06 UTC
Message-ID
<7vk57e1du3.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.00.0902251106070.3111@localhost.localdomain>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 11 quoted lines
>> You, I and experienced users know what to do.  Deal *only* with the last
>> kind, mark them with "git add" after you are done with each of them, and
>> make sure you do not say "-a" when committing the result, to exclude the
>> first kind from the merge result.
>> 
>> I've been wondering if we can make this safer for others.
>
> You're right. We could decide to have a mode (maybe default to it, so that 
> people like me can just use a config option to enable "expert" mode) that
> simply refuses to do the merge if it doesn't succeed cleanly if there were 
> dirty files in the tree.

"git merge" has always had this "stash away local changes before starting, and unstash once done" safety when we try to run multiple strategies. A patch to trigger it even for a single strategy case may be trivial.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 11 of 17 in “Files different for me”
  1. John DlugoszFeb 25, 2009
  2. Brian GernhardtFeb 25, 2009
  3. John DlugoszFeb 25, 2009
  4. Brian GernhardtFeb 25, 2009
  5. John DlugoszFeb 25, 2009
  6. Matthieu MoyFeb 25, 2009
  7. Junio C HamanoFeb 25, 2009
  8. Linus TorvaldsFeb 25, 2009
  9. Junio C HamanoFeb 25, 2009
  10. Linus TorvaldsFeb 25, 2009
  11. Junio C HamanoFeb 25, 2009
  12. Linus TorvaldsFeb 25, 2009
  13. Jay SoffianFeb 25, 2009
  14. John DlugoszFeb 25, 2009
  15. John DlugoszFeb 25, 2009
  16. Junio C HamanoFeb 25, 2009
  17. Feanil PatelFeb 25, 2009

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.