From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-devel@gnu.org
Subject: Re: Understanding a recent commit in emacs-25 branch [ed19f2]
Date: Sun, 03 Apr 2016 20:15:37 +0200 [thread overview]
Message-ID: <871t6m5zjq.fsf@Rainer.invalid> (raw)
In-Reply-To: jwvinzykcdn.fsf-monnier+gmane.emacs.devel@gnu.org
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
next prev parent reply other threads:[~2016-04-03 18:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 5:32 Understanding a recent commit in emacs-25 branch [ed19f2] Kaushal Modi
2016-04-01 5:43 ` Kaushal Modi
2016-04-01 6:43 ` Paul Eggert
2016-04-03 12:03 ` Alan Mackenzie
2016-04-03 12:10 ` Achim Gratz
2016-04-03 14:18 ` Stefan Monnier
2016-04-03 14:49 ` Óscar Fuentes
2016-04-03 18:15 ` Achim Gratz [this message]
2016-04-03 18:45 ` Andreas Schwab
2016-04-03 18:56 ` Eli Zaretskii
2016-04-03 20:02 ` Paul Eggert
2016-04-03 21:15 ` Andreas Schwab
2016-04-03 23:11 ` John Wiegley
2016-04-03 12:18 ` Ingo Lohmar
2016-04-03 11:17 ` Alan Mackenzie
2016-04-03 11:27 ` Andreas Schwab
2016-04-03 11:40 ` Ingo Lohmar
2016-04-03 12:14 ` Alan Mackenzie
2016-04-03 12:30 ` Ingo Lohmar
2016-04-03 14:12 ` Andreas Schwab
2016-04-03 14:57 ` Ingo Lohmar
2016-04-03 15:08 ` Andreas Schwab
2016-04-03 15:12 ` Eli Zaretskii
2016-04-03 15:01 ` Eli Zaretskii
2016-04-03 15:23 ` Ingo Lohmar
2016-04-03 15:40 ` Eli Zaretskii
2016-04-03 16:00 ` Ingo Lohmar
2016-04-03 16:19 ` Eli Zaretskii
2016-04-03 16:24 ` Andreas Schwab
2016-04-03 17:09 ` Eli Zaretskii
2016-04-03 17:35 ` Andreas Schwab
2016-04-03 18:04 ` Eli Zaretskii
2016-04-03 11:44 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871t6m5zjq.fsf@Rainer.invalid \
--to=stromeko@nexgo.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.