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

Re: Files different for me

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 25, 2009, 19:16 UTC
Message-ID
<76718490902251116l12e7d3c5jb42657cb0432ae40@mail.gmail.com>
In-Reply-To
<7v4oyi2vvf.fsf@gitster.siamese.dyndns.org>
On Wed, Feb 25, 2009 at 1:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> The handling of a case where a pull decides to go ahead (because it does
> not have to touch the Makefile you have your codename updates in) but does
> not complete with real conflicts, is not as graceful as the other two
> cases (merge refusing to run at all without touching anything, or merge
> completes cleanly and makes a commit).
>
> You will be left with:
>
>  - Paths that have local changes (index matches HEAD but work tree does
>   not match the index --- like your Makefile);
>
>  - Paths cleanly merged (index and HEAD are different but work tree
>   already matches the index);
>
>  - Unmerged paths (index has higher stage entries with <<</===/>>> files
>   in the work tree);
>
> 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.

Have pull detect this case and stash if so, with a message to the user to pop the stash after they have committed the merge results? Or would it make more sense to do it in merge? Maybe a pre-merge hook?

j.
Previous: Linus TorvaldsNext: John Dlugosz
Message 13 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.