From: Thomas Rast <trast@student.ethz.ch>
To: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Francis Moreau <francis.moro@gmail.com>,
Michael J Gruber <git@drmicha.warpmail.net>,
<git@vger.kernel.org>
Subject: Re: git-rebase skips automatically no more needed commits
Date: Mon, 26 Sep 2011 11:10:59 +0200 [thread overview]
Message-ID: <201109261110.59940.trast@student.ethz.ch> (raw)
In-Reply-To: <alpine.DEB.2.00.1109242148570.24369@debian>
Martin von Zweigbergk wrote:
>
> If I understand correctly, [rebase --root] was introduced to solve
> exactly the same reason problem that made Francis start this thread
> -- to avoid re-applying patches that are already in $onto.
Not quite; I wrote it because at the time, there was no way to
transplant git history onto a git-svn "make empty subdir" commit for
later dcommitting. So the main point was really
> After my patches (that are not yet ready) that calculate revisions as
> "git cherry $onto $orig_head $upstream", I don't think there should be
> any need for the --root flag. The only place the flag is checked now
> (in my current work tree, that is) is when deciding how to interpret
> the remaining arguments. Although I have not tried (temporarily)
> rewriting all the test cases from
>
> git rebase --root --onto upstream branch
>
> to
>
> git rebase upstream branch
>
> , I think it should work. What do you think, Thomas?
I still think it would be natural for a user to want a way to say "all
the way back to the root commit". At least for me the "full" rebase
invocation is
git rebase --onto onto base branch
In that mindset it comes natural to replace 'base' with --root if you
want to go all the way.
Maybe I don't trust rebase enough to do what I want ;-)
> I saw that
> "--root" is also passed to the hook. Should that value be passed to
> the hook also when the old base is not explicitly a root (by "rebase
> --root"), but only implicitly so (by an $onto that is disjoint from
> $branch)?
I think I did it that way because if you use --root, the base/upstream
argument is missing, and the hook needs to know that.
If the user specifies an upstream that is disjoint from the branch
itself, the hook gets the upstream argument and can presumably work it
out from there. So you could perhaps save the hook some trouble if
you *know* that it's a disjoint rebase, but I wouldn't spend too much
time on that.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2011-09-26 9:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 16:08 git-rebase skips automatically no more needed commits Francis Moreau
2011-09-06 17:09 ` Junio C Hamano
2011-09-06 19:28 ` Francis Moreau
2011-09-07 13:19 ` Michael J Gruber
[not found] ` <CAC9WiBi_bkLNJZckq2fr3eb6ie+KVfauE_PyA3GcaW5Ga-isFw@mail.gmail.com>
2011-09-07 16:29 ` Junio C Hamano
2011-09-08 7:10 ` Francis Moreau
2011-09-08 13:14 ` Martin von Zweigbergk
[not found] ` <CAC9WiBiMYUfaPtrXyW=W7qaZnJqLeFO-B3od7X4u8wUrb8hfUA@mail.gmail.com>
2011-09-09 2:23 ` Martin von Zweigbergk
2011-09-09 6:43 ` Francis Moreau
2011-09-09 13:06 ` Martin von Zweigbergk
2011-09-09 13:25 ` Francis Moreau
2011-09-15 2:19 ` Martin von Zweigbergk
2011-09-15 3:41 ` Junio C Hamano
2011-09-16 1:27 ` Martin von Zweigbergk
2011-09-20 20:45 ` Martin von Zweigbergk
2011-09-24 9:12 ` Ramkumar Ramachandra
2011-09-25 3:25 ` Martin von Zweigbergk
2011-09-26 9:10 ` Thomas Rast [this message]
2011-09-28 14:49 ` Martin von Zweigbergk
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=201109261110.59940.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=artagnon@gmail.com \
--cc=francis.moro@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=martin.von.zweigbergk@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 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).