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

Re: [PATCH] reset: --unmerge

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 26, 2016, 09:32 UTC
Message-ID
<CACsJy8Dn7m2axEFkkQtnZMs2yzFwivAJyZCWxODg-HQ=qLnVMA@mail.gmail.com>
In-Reply-To
<xmqqmvhsc8kn.fsf@gitster.mtv.corp.google.com>
On Wed, Oct 26, 2016 at 6:28 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Somebody with a bright idea decided that vc-git-resolve-conflicts
> variable should be on by default in Emacs 25.1 X-<,
Oh good, I have an excuse to stick to 24.5.1 for a while longer then.
Show 5 quoted lines
>  which causes
> "save" after resolving conflicts to automatically run "git add", to
> destroy this valuable tool.  My knee-jerk reaction, of course, to
> such a default is "that's brain dead", but perhaps they did so for
> some good reason that I fail to fathom.

I was curious. The default is t since the variable's introduction [1]. Interestingly the thread/bug that resulted in that commit started with "report this bug to git" [2]. Something about git-stash. I quote the original mail here in case anyone wants to look into it (not sure if it's actually reported here before, I don't pay much attention to git-stash mails)

-- 8< -- Bad news, everyone!

When a stash contains changes for several files, and "stash pop" encounters conflicts only in some of them, the rest of the files are stages automatically.

At least, that happens with Git 2.1.0 on my machine, and some commenters here: http://stackoverflow.com/a/1237337/615245

So then when we unstage the files which had conflicts after resolving those, the result is mixed. Which doesn't look right.

What shall we do? Unstage the automatically-staged files? Revert the changes from this bug? It seems Git really wants the changes staged after the conflict resolution. -- 8< --

[1] http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=45651154473c7d2f16230da765d034ecfde7968a [2] https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-05/msg00433.html

-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “reset: --unmerge”
  1. reset: --unmergeJunio C Hamano, Oct 24, 2016
  2. Duy NguyenOct 25, 2016
  3. Duy NguyenOct 25, 2016
  4. Junio C HamanoOct 25, 2016
  5. Duy NguyenOct 26, 2016
  6. Junio C HamanoOct 26, 2016
  7. Andreas SchwabOct 27, 2016
  8. Junio C HamanoOct 27, 2016
  9. Sergey OrganovOct 25, 2016

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.