Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Rast <trast@student.ethz.ch>,
	Nicolas Sebrecht <nicolas.s.dev@gmx.fr>,
	Baz <brian.ewins@gmail.com>,
	Peter Krefting <peter@softwolves.pp.se>,
	Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] Re: Clarify documentation on the "ours" merge strategy.
Date: Thu, 12 Nov 2009 10:55:21 +0100	[thread overview]
Message-ID: <20091112095521.GA3666@atjola.homenet> (raw)
In-Reply-To: <7vvdhggote.fsf@alter.siamese.dyndns.org>

On 2009.11.11 23:55:09 -0800, Junio C Hamano wrote:
> 58634db (rebase: Allow merge strategies to be used when rebasing,
> 2006-06-21) added "-m" and "-s" to rebase to solve the problem of rebasing
> against an upstream that has moved files.  What the commit actually did
> was to use recursive (by default) while giving longer rope to the users by
> choosing other strategies with "-s", without making any judgement as to
> why other strategies may possibly be useful.

At least the original reason for 58634db became (partially?) moot half a
year later, thanks to 579c9bb19 "Use merge-recursive in git-am -3".
Rebase already falls back to recursive merging in am, so using rebase -m
with the recursive strategy just stops it from trying the fast path,
right?

That should probably be reflected in the man page, but honestly I have
no idea what to write there now. The note about recursive should go, but
keeping only "Use merging strategies to rebase" doesn't actually look
like it's going to be helpful in any way.

> Perhaps there is some different issue at the root of this one.  Why would
> anybody be tempted to say "-s ours" while running a rebase?  What did the
> user want to see it do (instead of being a no-op because "ours" by
> definition ignores the tree the change is replayed from)?

Given the few requests I've seen of it (here + #git), I'd guess that
the user wants "git rebase -s ours $up" to do either:

MB=$(git merge-base $up HEAD)
git filter-branch --parent-filter "sed -e s/$MB/$up/" -- HEAD --not $up

i.e. just re-attach things to upstream, ignoring whatever upstream did
(git-svn users seem to want something like that sometimes to be able to
dcommit. Dunno if they have some hatred against the other users of their
svn repo ;-))

Or the user wants the infamous "resolve conflicts to want I did", often
enough without thinking about what that actually means and how it can
easily lead to total crap. (Yes, I'm biased...)

Björn

  parent reply	other threads:[~2009-11-12  9:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 12:26 git pull --rebase and losing commits Peter Krefting
2009-11-02 15:04 ` Thomas Rast
2009-11-02 21:34   ` Nanako Shiraishi
2009-11-02 15:10 ` Björn Steinbrink
2009-11-03  7:01   ` Peter Krefting
2009-11-03  9:52     ` Johannes Schindelin
2009-11-03 10:12       ` Peter Krefting
2009-11-11 14:03       ` [PATCH] Clarify documentation on the "ours" merge strategy Peter Krefting
2009-11-11 15:13         ` Baz
2009-11-11 20:35           ` Thomas Rast
2009-11-11 20:54             ` Baz
2009-11-11 21:02             ` Junio C Hamano
2009-11-11 21:30               ` [PATCH] " Nicolas Sebrecht
2009-11-11 23:37                 ` Thomas Rast
2009-11-12  7:55                   ` Junio C Hamano
2009-11-12  9:41                     ` Peter Krefting
2009-11-14  2:12                       ` Nanako Shiraishi
2009-11-15  9:10                         ` Junio C Hamano
2009-11-16  8:20                           ` Peter Krefting
2009-11-12  9:55                     ` Björn Steinbrink [this message]
2009-11-15 18:25                     ` [PATCH 0/3] Document and refuse rebase -s ours Thomas Rast
2009-11-15 18:25                       ` [PATCH 1/3] Documentation: clarify 'ours' merge strategy Thomas Rast
2009-11-15 18:25                       ` [PATCH 2/3] rebase docs: clarify --merge and --strategy Thomas Rast
2009-11-15 21:05                         ` Junio C Hamano
2009-11-15 21:11                           ` Thomas Rast
2009-11-15 18:25                       ` [PATCH 3/3] rebase: refuse to rebase with -s ours Thomas Rast
2009-11-15 18:39                         ` Sverre Rabbelier
2009-11-15 18:44                           ` Thomas Rast
2009-11-16 12:35                         ` Johannes Schindelin
2009-11-16 19:57                           ` Junio C Hamano
2009-11-16 21:25                             ` Johannes Schindelin
2009-11-16 21:45                               ` Junio C Hamano
2009-11-16 22:04                                 ` Sverre Rabbelier
2009-11-16 23:04                               ` A Large Angry SCM
2009-11-15 21:04                       ` [PATCH 0/3] Document and refuse rebase " Junio C Hamano
2009-11-15 21:13                         ` Thomas Rast
2009-11-03 10:12     ` git pull --rebase and losing commits Thomas Rast
2009-11-03  4:27 ` Randal L. Schwartz

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=20091112095521.GA3666@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=brian.ewins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nicolas.s.dev@gmx.fr \
    --cc=peter@softwolves.pp.se \
    --cc=trast@student.ethz.ch \
    /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