git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Haberman <stephen@exigencecorp.com>
To: stephen@exigencecorp.com, git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, avarab@gmail.com
Subject: [RFC] allow git pull to preserve merges
Date: Thu,  8 Aug 2013 12:38:11 -0500	[thread overview]
Message-ID: <1375983492-32282-1-git-send-email-stephen@exigencecorp.com> (raw)

Hey,

Following up on an old thread (2008):

http://git.661346.n2.nabble.com/pull-preserve-merges-td1471688.html

I'd like to finally add a config parameter/setting to allow git pull to preserve
merges when it's rebasing. This addresses a somewhat common boundary case of a
locally merged feature branch getting flattened into master, as described here:

http://notes.envato.com/developers/rebasing-merge-commits-in-git/

This current patch adds a new `pull.preserve-merges` boolean config setting, but
we could also change the existing `pull.rebase` to be tri-state (so
`pull.rebase` can be true, false, or preserve-merges), or add a more generic
`pull.rebaseoptions` that is just a string of flags to pass to rebase.

Any of these would be fine with me--what would be preferred?

This patch doesn't update the docs, but I wanted to get an initial sanity check
on the preferred config setting before doing that.

Thanks!

- Stephen


Stephen Haberman (1):
  pull: Allow pull to preserve merges when rebasing.

 git-pull.sh     | 11 +++++++++--
 t/t5520-pull.sh | 15 +++++++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)

-- 
1.8.1.2

             reply	other threads:[~2013-08-08 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 17:38 Stephen Haberman [this message]
2013-08-08 17:38 ` [PATCH] pull: Allow pull to preserve merges when rebasing Stephen Haberman
2013-08-08 19:08   ` Stephen Haberman
2013-08-08 21:20   ` Johannes Schindelin
2013-08-08 21:35     ` Stephen Haberman
2013-08-08 21:56       ` Philip Oakley
2013-08-08 21:57       ` Junio C Hamano
2013-08-09 14:19         ` Johannes Schindelin
2013-08-09 15:28           ` Stephen Haberman

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=1375983492-32282-1-git-send-email-stephen@exigencecorp.com \
    --to=stephen@exigencecorp.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).