From: David Engster <deng@randomsample.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master c6f03ed: Fix a problem in url.el without GnuTLS
Date: Mon, 15 Dec 2014 21:39:58 +0100 [thread overview]
Message-ID: <87mw6oodep.fsf@engster.org> (raw)
In-Reply-To: <83a92py3p3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 15 Dec 2014 05:47:20 +0200")
Eli Zaretskii writes:
>> From: David Engster <deng@randomsample.de>
>> Cc: emacs-devel@gnu.org
>> Date: Sun, 14 Dec 2014 22:40:41 +0100
>> > . This is true for merges from local branches as well. Therefore,
>> > using this option is not advisable for local branches, because
>> > doing that would mean trouble when I next merge from master into
>> > my local branch -- I will get the same commits back again.
>>
>> Do you mean you have a long-living local branch which you regularly
>> merge to master?
>
> No. But when I work on a feature branch that takes weeks, sometimes
> months, to complete, I merge from master near the end of the
> development, to make sure landing the feature will not introduce
> regressions. Sometimes there's more than one such merge, especially
> if I discover subtle issues as result of merging.
I see. I guess you could avoid those problems by merging origin/master
instead. But actually, instead of merging master into your feature
branch, I'd rather recommend rebasing it *onto* master, but explicitly
and not as a side effect of pull. I'm not a big fan of 'pull --rebase';
it works nice until it doesn't. As you've seen, this combination of
pull+rebase can lead to pretty surprising results, and the '=preserve'
simply changes what kind of surprise you're getting.
For local feature branches, I would recommend the following (not saying
this is "the right way" or anything, but maybe you find something useful
in there):
- Instead of merging master into my feature branch, I rebase it
explicitly by doing
git checkout featurebranch
git rebase master
- I only merge feature branches into master when they are finished and I
plan to push directly afterwards.
- Before merging to master, I rebase onto it one last time so that the
merge has no conflicts, then I merge with '--no-ff' and push.
- If the push fails because there are new commits upstream, instead of
using 'pull --rebase=preserve', I rather delete the merge so that I
get a "normal" fast-forward pull and merge again. If I'm really
unlucky, this new commit from upstream causes a conflict now, in which
case I usually just resolve it, simply hoping that the push will work
next time.
Of course, for *public* branches like emacs-24, one must not use
'rebase' in any way but do a normal merge. If the push fails, do a
regular 'pull' so that the new commits are merged and push again.
>> Isn't flattening of the history precisely what you want when you have
>> merges of local branches, so that they appear like they were made on
>> master?
>
> No. When development was on a branch, I generally want to preserve
> that branch in the history, not flatten it. My commits on a feature
> branch follow some logic that is important to me (and documented in
> the commit log messages), so that long after the job is done these
> commits make it easier to understand why something was done the way it
> was, and also find the reasons for bugs or misfeatures.
I agree. I misunderstood your statement that your commits should not
look like they were made on another branch, but if I understand you
correctly now, you mean you don't want to have merge commits from master
before pushing, but you rather prefer to rebase (to which I agree as
well).
-David
next prev parent reply other threads:[~2014-12-15 20:39 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20141211155740.11916.1584@vcs.savannah.gnu.org>
[not found] ` <E1Xz67Y-00036o-Vf@vcs.savannah.gnu.org>
2014-12-11 16:47 ` master c6f03ed: Fix a problem in url.el without GnuTLS Leo Liu
2014-12-11 18:08 ` Eli Zaretskii
2014-12-11 23:00 ` Ted Zlatanov
2014-12-12 9:23 ` Eli Zaretskii
2014-12-12 13:24 ` Ted Zlatanov
2014-12-12 14:28 ` Eli Zaretskii
2014-12-12 16:06 ` Stefan Monnier
2014-12-13 0:25 ` Ted Zlatanov
2014-12-13 0:28 ` Lars Magne Ingebrigtsen
2014-12-13 1:25 ` Ted Zlatanov
2014-12-13 8:04 ` Eli Zaretskii
2014-12-13 10:16 ` David Engster
2014-12-18 22:38 ` David Engster
2014-12-19 8:50 ` Eli Zaretskii
2014-12-13 9:04 ` David Engster
2014-12-13 9:50 ` David Engster
2014-12-13 13:19 ` Ted Zlatanov
2014-12-13 14:13 ` David Engster
2014-12-13 14:25 ` Ted Zlatanov
2014-12-13 15:18 ` Eli Zaretskii
2014-12-13 19:44 ` David Engster
2014-12-13 19:59 ` Eli Zaretskii
2014-12-13 22:00 ` Dmitry Gutov
2014-12-14 3:36 ` Eli Zaretskii
2014-12-13 23:13 ` David Engster
2014-12-14 16:09 ` Eli Zaretskii
2014-12-14 16:37 ` Ted Zlatanov
2014-12-14 16:55 ` Eli Zaretskii
2014-12-14 17:00 ` Ted Zlatanov
2014-12-14 23:21 ` Stefan Monnier
2014-12-14 17:46 ` Paul Eggert
2014-12-14 17:50 ` Eli Zaretskii
2014-12-14 18:28 ` Ted Zlatanov
2014-12-14 19:41 ` David Engster
2014-12-14 21:40 ` David Engster
2014-12-15 3:47 ` Eli Zaretskii
2014-12-15 20:39 ` David Engster [this message]
2014-12-16 19:42 ` Eli Zaretskii
2014-12-17 9:58 ` Steinar Bang
2014-12-17 10:52 ` Steinar Bang
2014-12-17 15:36 ` Eli Zaretskii
2014-12-17 15:35 ` Eli Zaretskii
2014-12-17 20:37 ` David Engster
2014-12-18 4:55 ` Stephen J. Turnbull
2014-12-18 15:39 ` Eli Zaretskii
2014-12-18 20:00 ` Steinar Bang
2014-12-18 20:40 ` Eli Zaretskii
2014-12-19 8:09 ` Steinar Bang
2014-12-19 9:16 ` Eli Zaretskii
2014-12-19 10:33 ` Steinar Bang
2014-12-18 21:18 ` David Engster
2014-12-18 15:38 ` Eli Zaretskii
2014-12-18 19:46 ` Steinar Bang
2014-12-18 20:35 ` Eli Zaretskii
2014-12-19 6:07 ` Yuri Khan
2014-12-19 7:57 ` Steinar Bang
2014-12-19 9:09 ` Eli Zaretskii
2014-12-18 20:46 ` David Engster
2014-12-14 22:42 ` Stefan Monnier
2014-12-15 3:37 ` Eli Zaretskii
2014-12-15 4:46 ` Stefan Monnier
2014-12-12 20:46 ` Lars Magne Ingebrigtsen
2014-12-12 0:30 ` Leo Liu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mw6oodep.fsf@engster.org \
--to=deng@randomsample.de \
--cc=eliz@gnu.org \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).