All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Yann Dirson <dirson@bertin.fr>, git list <git@vger.kernel.org>
Subject: Re: Itches with the current rev spec
Date: Fri, 26 Apr 2013 14:13:25 -0700	[thread overview]
Message-ID: <7v8v45vvuy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAMP44s0-C_TRC_eD_ZbN3WFe4NKWVPQVhh+ME-F5yBBwKs2NdA@mail.gmail.com> (Felipe Contreras's message of "Fri, 26 Apr 2013 14:48:38 -0500")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> I don't know what 'git rebase master' does, but I would expect 'git
> rebase --onto=master' to do the same thing. Then, if 'git rebase
> --onto=next master..topic' makes sense, so should 'git rebase next
> master..topic'.
>
> Moreover, it often annoys me that 'git rebase master' does exactly
> what I want, but 'git rebase --onto=master previous' doesn't find the
> commits that are already into 'master'. One would expect the more
> defined version to work better, but it doesn't =/

That all stems from the fact that rebase (not -i variant) predates
these nice A..B, A...B, and $(merge-base A B) concepts have been
ingrained in the user's mindset as the primary UI language of Git.

 - The UI language of "rebase origin" comes more from the "workflow"
   school.  "I have built on 'origin'; I want to catch up with its
   current state".  To support that workflow, 'origin' is the only
   thing you need to say, and "rebase origin" matches that nicely.
   If you then add "By the way, that statement expresses my wish for
   the 'topic' branch, not my current one", you get "rebase origin
   topic".

 - If the UI language for "rebase" were designed following the
   "composition using common elements like ranges and revisions"
   school, it would have started from "rebase --onto=X A..B".

Back then, we did not know which principle to design the UI language
would prevail, but we needed something that works to support the end
users.  So "git log" spoke "A..B" but "git rebase" took "origin".

Over time, the "composition" school prevailed and these days we see
many commands accept and act on revision ranges or discrete
revisions.

The same thing happened to format-patch, whose original syntax was

    format-patch origin

which is still accepted, but we have adjusted it to understand the
more prevalent

    format-patch origin..

because it is far more understandable if you know other commands
that are based on "composition" UI language.  That adjustment
started making sense after it has become clear that "composition"
school of UI language is the way forward.

It's just that "rebase" is waiting for the same kind of adjustment.

Hint, hint.

  reply	other threads:[~2013-04-26 21:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25  5:07 Itches with the current rev spec Ramkumar Ramachandra
2013-04-25  5:54 ` Ramkumar Ramachandra
2013-04-25  8:22 ` Matthieu Moy
2013-04-25  8:48   ` Felipe Contreras
2013-04-25 11:06     ` Ramkumar Ramachandra
2013-04-29 14:00   ` Michael J Gruber
2013-04-25  9:09 ` Andreas Schwab
2013-04-25  9:13   ` Ramkumar Ramachandra
2013-04-25 19:08 ` Phil Hord
2013-04-26  8:19 ` Yann Dirson
2013-04-26  8:43   ` Johannes Sixt
2013-04-26 12:33     ` Ramkumar Ramachandra
2013-04-26 17:49     ` Junio C Hamano
2013-04-26 19:48       ` Felipe Contreras
2013-04-26 21:13         ` Junio C Hamano [this message]
2013-04-29 15:08           ` Ramkumar Ramachandra
2013-04-29 15:37             ` Yann Dirson
2013-04-29 16:05             ` Junio C Hamano
2013-04-29 17:14               ` Ramkumar Ramachandra
2013-04-29 17:33                 ` Junio C Hamano
2013-04-29 19:10                   ` Ramkumar Ramachandra
2013-04-29 19:23               ` Ramkumar Ramachandra
2013-04-30  4:02               ` Junio C Hamano
2013-04-29 15:20           ` Ramkumar Ramachandra

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=7v8v45vvuy.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=dirson@bertin.fr \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /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.