From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: How to switch kernel customizations from 2.6.15.6 to 2.6.16?
Date: Tue, 28 Mar 2006 19:58:15 -0800 [thread overview]
Message-ID: <7vlkutc36w.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0603281749060.15714@g5.osdl.org> (Linus Torvalds's message of "Tue, 28 Mar 2006 18:10:46 -0800 (PST)")
Linus Torvalds <torvalds@osdl.org> writes:
> Personally, I think the rebase syntax sucks, because the _natural_ way
> to do it is to just describe the set of commits to rebase the same way
> we describe all _other_ commit sets: as a "begin..end" sequence.
I'd agree in general, and I am not happy about them.
But I have an excuse.
rev-parse's A..B notation was invented on June 13th (178cb24).
But format-patch was originally posted on May 30th:
http://article.gmane.org/gmane.comp.version-control.git/4279
before the convenience of rev-parse was invented ;-).
> So I think rebase _should_ work something like this:
>
> git rebase origin.. [--onto] linus
>
> ie just giving an arbitrary range.
In addition, both rebase and format-patch does a bit more than
straight his..mine.
*---x---x---o---o---o---o
\ ^mine
.---.---.---.
^his
We do _not_ want to process all six of his..mine commits when
doing "format-patch his mine" in the above picture, because
upstream might have accepted some of them already, and we filter
them out with git-cherry.
> This is even more noticeable for "git-format-patch", where
> that insane "<his> [<mine>]" syntax is even worse, for no
> good reason, when again it should really just work like "git
> diff" where giving a single revision implies a single
> revision, and giving a range implies a range, and no strange
> "mine" vs "his" rules ]
Having said that, you have been able to say format-patch A..B
C..D E..F for quite some time (since November 21, 2005).
Rebase is even more strange, especially with --onto. When you do
$ rebase --onto his origin mine
in this picture,
*---x---x---o---o---o---o
\ ^origin ^mine
.---.---.---.
^his
you are discarding two 'x' commits, and lost-found is the only
thing that would help you to recover them.
Unlike format-patch which takes ranges, rebase does not let you
say "rebase --onto base A..B C..D E..F"; what happens might be
too confusing, especially if B, D, F are not coming from the
current branch. The current branch is rewound to base and then
the chosen sets of patches are applied, which is kind-of scary.
It would feel safer to do:
$ git checkout -b newbranch base
$ git format-patch --stdout A..B C..D E..F | git am -3
and after making sure the result is really what you want
resetting the original branch to the current (newbranch) head.
next prev parent reply other threads:[~2006-03-29 3:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-29 1:43 How to switch kernel customizations from 2.6.15.6 to 2.6.16? Matt McCutchen
2006-03-29 2:10 ` Linus Torvalds
2006-03-29 2:30 ` Junio C Hamano
2006-03-29 3:58 ` Junio C Hamano [this message]
2006-03-29 19:27 ` Linus Torvalds
2006-03-29 19:39 ` Linus Torvalds
2006-03-29 20:24 ` Junio C Hamano
2006-03-30 1:59 ` Rebase semantic and cherry-pick Jakub Narebski
2006-03-30 2:38 ` Junio C Hamano
2006-03-30 2:54 ` Linus Torvalds
2006-03-30 3:40 ` Junio C Hamano
2006-03-30 3:15 ` How to switch kernel customizations from 2.6.15.6 to 2.6.16? Junio C Hamano
2006-03-29 2:23 ` Shawn Pearce
2006-03-29 2:26 ` Junio C Hamano
2006-03-30 3:01 ` Matt McCutchen
2006-03-30 3:22 ` Junio C Hamano
2006-03-30 3:47 ` Matt McCutchen
2006-03-30 17:32 ` Linus Torvalds
2006-03-30 21:50 ` Matt McCutchen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vlkutc36w.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).