git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Tom Clarke <tom@u2i.com>
Cc: Carl Worth <cworth@cworth.org>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes.Schindelin@gmx.de, git@vger.kernel.org
Subject: Re: [PATCH] Adding rebase merge strategy
Date: Mon, 1 Oct 2007 18:30:50 -0400	[thread overview]
Message-ID: <20071001223050.GE2137@spearce.org> (raw)
In-Reply-To: <550f9510710011521s126ca747v956a6f80182444bb@mail.gmail.com>

Tom Clarke <tom@u2i.com> wrote:
> On 10/2/07, Carl Worth <cworth@cworth.org> wrote:
> > What I think I've always wanted is something like the following
> > behavior for "git pull":
> >
> >   * Fast forward if possible
> >
> >   * Otherwise, rebase, but only if there are no conflicts at all
> >
> >   * Otherwise, do the merge as normal, (leave conflict markers in
> >     place allowing the user to fix them up and then commit).
> >
> > Would it be straightforward to turn your rebase merge strategy into
> > something like the above? And if so, would that address the primary
> > concerns that Junio raised?
> 
> Maybe we need a 'pull' strategy' - merge, rebase or <insert name for
> strategy you describe above>.

`git pull -s <name>` takes any merge strategy that git-merge will
accept for its -s option.  There is also the config option of
pull.twohead that indicates what the default merge/pull strategy
should be for a two head merge.  Most people don't set this,
letting the code default to 'recursive'.

But I have to agree with (was it Junio who said this?) doing a rebase
in a merge strategy doesn't make sense when conflicts come into play.
It gets confusing fast for the end-user as the conflict resolution
process is different than for a merge.  A long time ago I wrote a
git-merge-rebase strategy and gave up on it for basically the same
reason.  I posted it to the mailing list and I think Linus said
"Why?!".  That was the end of that thread as I wound up agreeing
with him.

Multiple merge strategies can be given (and attempted).  A rebase
strategy could be attempted before recursive, and if the rebase
fails but the recursive succeeds then you get (roughly) what is
being described above by Carl.  But that still requires a rebase
merge strategy.  :-\

-- 
Shawn.

  reply	other threads:[~2007-10-01 22:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28 16:15 [PATCH] Adding rebase merge strategy Tom Clarke
2007-09-28 17:03 ` Johannes Schindelin
2007-09-28 17:18   ` Tom Clarke
2007-10-01 15:08   ` Tom Clarke
2007-10-01 15:50     ` Johannes Schindelin
2007-10-01 21:01     ` Junio C Hamano
2007-10-01 21:41       ` Tom Clarke
2007-10-01 22:17         ` Carl Worth
2007-10-01 22:21           ` Tom Clarke
2007-10-01 22:30             ` Shawn O. Pearce [this message]
2007-10-01 22:53               ` Carl Worth
2007-10-01 23:11                 ` Junio C Hamano
2007-10-02 10:00               ` Johannes Schindelin
2007-10-02 10:29                 ` Tom Clarke
2007-10-02 18:40                   ` Junio C Hamano
2007-10-03 14:11                     ` Tom Clarke
2007-10-03 15:54                       ` Johannes Schindelin
2007-10-01 23:09           ` J. Bruce Fields
2007-10-01 22:28         ` Junio C Hamano
     [not found] <11885023904126-git-send-email-tom@u2i.com>
2007-08-30 19:36 ` Tom Clarke
2007-08-30 19:53   ` Johannes Schindelin

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=20071001223050.GE2137@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=tom@u2i.com \
    /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).