All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sverre Rabbelier <srabbelier@gmail.com>
Cc: Git Mailinglist <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Eric Wong <normalperson@yhbt.net>,
	"Shawn O. Pear,
	Sverre Rabbelier
	<srabbelier@gmail.com>"@b-sasl-quonix.sasl.smtp.pobox.com
Subject: Re: [RFC PATCH] Teach rebase to rebase even if upstream is up to date  with -f
Date: Thu, 12 Feb 2009 17:32:47 -0800	[thread overview]
Message-ID: <7vhc2zglz4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <bd6139dc0902121524o776703bdw1bb199caecbc9c21@mail.gmail.com> (Sverre Rabbelier's message of "Fri, 13 Feb 2009 00:24:14 +0100")

Sverre Rabbelier <srabbelier@gmail.com> writes:

> On Fri, Feb 13, 2009 at 00:22, Junio C Hamano <gitster@pobox.com> wrote:
>> No, because I didn't read the patch text; I don't read patches that are
>> larger than 20 lines during the day-job hours.
>
> Hehe, that sounds like a fair policy.
>
>> I was only commenting on your "rebase does not work if I am up to date
>> with respect to origin and here is my workaround".
>
> Ok, thanks for the comment then, I'll wait for more comment and maybe
> write some tests tomorrow.

Ok, now it is past 5pm, I've read the patch.

I wonder if we can (and if so should) make this a bit more automatic
without having to say "rebase -f --whitespace=fix".

When you say "git rebase --whitespace=fix origin" from the command line,
you are explicitly saying "I want to *fix* breakages in the commits since
'origin'", and at that point, it stops mattering if origin stayed dormant
since you forked from it.  I'd say that the current behaviour is a bug
introduced by the commit that added --whitespace=fix option.

The logic is the same as "git rebase --interactive origin" that does not
refuse to work even if you are already ahead of the origin.

So my suggestion would be to add --force (or -f) like your patch does, and
also detect --whitespace=$option given from the command line, and if it is
fix (or its synonym "strip"), automatically enable --force, perhaps as a
follow up patch, or in the same patch.

  reply	other threads:[~2009-02-13  1:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 19:47 [RFC PATCH] Teach rebase to rebase even if upstream is up to date with -f Sverre Rabbelier
2009-02-12 20:28 ` Johannes Schindelin
2009-02-12 20:30   ` Sverre Rabbelier
2009-02-12 20:37     ` Johannes Schindelin
2009-02-12 20:44       ` Sverre Rabbelier
2009-02-12 21:34 ` Junio C Hamano
2009-02-12 21:57   ` Sverre Rabbelier
2009-02-12 23:22     ` Junio C Hamano
2009-02-12 23:24       ` Sverre Rabbelier
2009-02-13  1:32         ` Junio C Hamano [this message]
2009-02-13  6:02           ` Sverre Rabbelier
2009-02-13  6:22             ` Junio C Hamano
2009-02-13  6:51               ` Sverre Rabbelier
2009-02-13  7:15                 ` Junio C Hamano

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=7vhc2zglz4.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc="Shawn O. Pear, Sverre Rabbelier <srabbelier@gmail.com>"@b-sasl-quonix.sasl.smtp.pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    --cc=srabbelier@gmail.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 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.