[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Understanding a recent commit in emacs-25 branch [ed19f2]
From: |
Achim Gratz |
Subject: |
Re: Understanding a recent commit in emacs-25 branch [ed19f2] |
Date: |
Sun, 03 Apr 2016 20:15:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) |
Stefan Monnier writes:
>>> It was git that prepared the merge, not me.
>> Blaming the tools?
>
> Yes. Git makes it all too easy here to create such annoying merge
> commits, and if you don't have enough experience with Git you won't
> even notice it.
Git actually stopped and asked to fix the conflicts I must assume. I
don't know which Git version Alan is using under what localization, but
here an intentionally created merge conflict will create this message
(I've set LC_MESSAGES=POSIX to avoid the localization):
Auto-merging lisp/net/tramp-sh.el
CONFLICT (content): Merge conflict in lisp/net/tramp-sh.el
Automatic merge failed; fix conflicts and then commit the result.
Note that nothing there even suggests you should do a manual merge,
which is what Alan tells us he has done (I don't know if that's what he
did).
> But even if you do notice it, it can be pretty challenging to fix it
> after the fact, or to avoid it before the fact.
Either of
git merge --abort
git --reset merge
would have put you back on square one to try again. Also, based on what
Alan said I believe there was just a single conflict, which would
presumably have been easy to fix and commit. And there's alway the
possibility to branch just before any operation you think might fail
(and if you forgot to do that there's the reflog).
> It's not just that Git is a sharp tool here: in this instance, it makes
> it easy to do the wrong thing, and hard to do the right thing.
I don't think so. For an upstream-tracking branch rebase=true should be
the default. For feature-branches that merge from some other branch,
you can still rebase, but should preserve the merges from the other
branch (rebase=preserve). Both settings can be made the default on a
per-branch basis to save you the bother of typing and remebering.
I'd like to recommend again to anyone using a DVCS to just play around
with a few throwaway clones of a reasonably sized repository. Once you
think that you understand what's going on, try to break things:
introduce conflicts, delete files from the worktree, commit to the wrong
branch, whatever. Then find out what exactly broke and how to fix it.
This doesn't take all that long, about an hour or two should cover a lot
of ground already.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
- Understanding a recent commit in emacs-25 branch [ed19f2], Kaushal Modi, 2016/04/01
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Kaushal Modi, 2016/04/01
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Paul Eggert, 2016/04/01
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Alan Mackenzie, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Achim Gratz, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Stefan Monnier, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Óscar Fuentes, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2],
Achim Gratz <=
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Andreas Schwab, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Eli Zaretskii, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Paul Eggert, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Andreas Schwab, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], John Wiegley, 2016/04/03
- Re: Understanding a recent commit in emacs-25 branch [ed19f2], Ingo Lohmar, 2016/04/03
Re: Understanding a recent commit in emacs-25 branch [ed19f2], Alan Mackenzie, 2016/04/03