* Question about git rebase --onto @ 2010-02-02 17:49 Pascal Obry 2010-02-02 18:11 ` Junio C Hamano 0 siblings, 1 reply; 12+ messages in thread From: Pascal Obry @ 2010-02-02 17:49 UTC (permalink / raw) To: git list It seems to me that: $ git co topic $ git rebase --onto master topic~2 topic Used to do the job and rebase the topic branch as expected. Today when I tried with 1.7.0.rc1.10.gb8bb after the rebase above I was left on a detached head. Is my recollection wrong? Has this been changed recently? Thanks, Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-02 17:49 Question about git rebase --onto Pascal Obry @ 2010-02-02 18:11 ` Junio C Hamano 2010-02-02 18:15 ` Junio C Hamano 2010-02-02 18:19 ` Pascal Obry 0 siblings, 2 replies; 12+ messages in thread From: Junio C Hamano @ 2010-02-02 18:11 UTC (permalink / raw) To: pascal; +Cc: git list Pascal Obry <pascal@obry.net> writes: > It seems to me that: > > $ git co topic > $ git rebase --onto master topic~2 topic > > Used to do the job and rebase the topic branch as expected. Today when I > tried with 1.7.0.rc1.10.gb8bb after the rebase above I was left on a > detached head. > > Is my recollection wrong? Has this been changed recently? Either a recent bug or a user error, I think, as we didn't intend to change. My quick manual test didn't show such a bug but rebase is one of the areas that acquired new code recently. Possible user errors I can think of are: - If 'topic' is not a local branch, the result will be on a detached HEAD, as you are starting from a detached HEAD (i.e. 'topic' could be a tag); - Until you resolved and said "rebase --continue" (or --skip) to allow it to conclude the rebase when the operation conflicted, you would be on a detached HEAD. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-02 18:11 ` Junio C Hamano @ 2010-02-02 18:15 ` Junio C Hamano 2010-02-02 18:19 ` Pascal Obry 1 sibling, 0 replies; 12+ messages in thread From: Junio C Hamano @ 2010-02-02 18:15 UTC (permalink / raw) To: Junio C Hamano; +Cc: pascal, git list Junio C Hamano <gitster@pobox.com> writes: > Possible user errors I can think of are: > > - If 'topic' is not a local branch, the result will be on a detached > HEAD, as you are starting from a detached HEAD (i.e. 'topic' could be a > tag); > > - Until you resolved and said "rebase --continue" (or --skip) to allow it > to conclude the rebase when the operation conflicted, you would be on a > detached HEAD. Just to clarify, these things are _not_ errors at all. What I meant by "user error" was to notice that the HEAD is detached in these cases (which is not an error) and panicking (which is). Both of these are normal procedures and sane states. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-02 18:11 ` Junio C Hamano 2010-02-02 18:15 ` Junio C Hamano @ 2010-02-02 18:19 ` Pascal Obry 2010-02-04 1:12 ` Junio C Hamano 1 sibling, 1 reply; 12+ messages in thread From: Pascal Obry @ 2010-02-02 18:19 UTC (permalink / raw) To: Junio C Hamano; +Cc: git list Junio, > Possible user errors I can think of are: > > - If 'topic' is not a local branch, the result will be on a detached > HEAD, as you are starting from a detached HEAD (i.e. 'topic' could be a > tag); I'm not on this case. > - Until you resolved and said "rebase --continue" (or --skip) to allow it > to conclude the rebase when the operation conflicted, you would be on a > detached HEAD. I'm not in this case either. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-02 18:19 ` Pascal Obry @ 2010-02-04 1:12 ` Junio C Hamano 2010-02-04 16:46 ` Pascal Obry 0 siblings, 1 reply; 12+ messages in thread From: Junio C Hamano @ 2010-02-04 1:12 UTC (permalink / raw) To: pascal; +Cc: git list Pascal Obry <pascal@obry.net> writes: >> Possible user errors I can think of are: >> ... > I'm not on this case. > ... > I'm not in this case either. Thenk there are some _other_ differences between your situation and what I can construct from your problem description: It seems to me that: $ git co topic $ git rebase --onto master topic~2 topic Used to do the job and rebase the topic branch as expected.... which I tried myself before giving you a reply, and I didn't end up on a detached HEAD. But I cannot guess what that difference you are not telling us is (and you probably don't know it either, I suspect). Writing reproducible test case would be a great way to diagnose this. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-04 1:12 ` Junio C Hamano @ 2010-02-04 16:46 ` Pascal Obry 2010-02-04 16:50 ` Junio C Hamano 0 siblings, 1 reply; 12+ messages in thread From: Pascal Obry @ 2010-02-04 16:46 UTC (permalink / raw) To: Junio C Hamano; +Cc: git list Junio, > Writing reproducible test case would be a great way to diagnose this. I just can't reproduce now! I've tried on a second machine starting from the same repository state and still can't reproduce! So either I was in really bad shape last night or it was some kind of transient problem on my Cygwin/Git system. Sorry for the noise. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-04 16:46 ` Pascal Obry @ 2010-02-04 16:50 ` Junio C Hamano 2010-02-17 9:25 ` Pascal Obry 0 siblings, 1 reply; 12+ messages in thread From: Junio C Hamano @ 2010-02-04 16:50 UTC (permalink / raw) To: pascal; +Cc: git list Pascal Obry <pascal@obry.net> writes: >> Writing reproducible test case would be a great way to diagnose this. > > I just can't reproduce now! I've tried on a second machine starting from > the same repository state and still can't reproduce! So either I was in > really bad shape last night or it was some kind of transient problem on > my Cygwin/Git system. > > Sorry for the noise. Don't be sorry. We need to know about issues, and sporadic failures, if they are real, are the ones that affects people the worst way. Thanks for spending time to reproduce---and please do report (and preserve the reproducible state if possible) when you see a breakage (like this one, or some other form) next time. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-04 16:50 ` Junio C Hamano @ 2010-02-17 9:25 ` Pascal Obry 2010-02-17 10:19 ` Tay Ray Chuan 0 siblings, 1 reply; 12+ messages in thread From: Pascal Obry @ 2010-02-17 9:25 UTC (permalink / raw) To: Junio C Hamano; +Cc: git list Junio, > Thanks for spending time to reproduce---and please do report (and preserve > the reproducible state if possible) when you see a breakage (like this > one, or some other form) next time. I have a reproducer this time. $ git --version git version 1.7.0.14.g7e948 $ git clone http://git.sv.gnu.org/r/v2p.git $ cd v2p/ $ git branch v3.1 origin/v3.1 $ git co -b po/new-context-support origin/po/new-context-support $ git cherry -v master po/new-context-support + bb8647179385ecf2a5053da9a4af9e24437a5b34 Modifications to use the new AWS's context implementation. + 12db018f5a448869b1679550cb2fd0e33336a6c9 Minor reformatting. + f7888edb7572ca6d62f35e594d231c7974bc9515 Fix testsuite to pass with the new context support. $ git rebase --onto v3.1 HEAD~3 HEAD At this point I'm on a detached HEAD. $ git status # Not currently on any branch. nothing to commit (working directory clean) Let me know if you need additional information. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-17 9:25 ` Pascal Obry @ 2010-02-17 10:19 ` Tay Ray Chuan 2010-02-17 10:27 ` Pascal Obry 0 siblings, 1 reply; 12+ messages in thread From: Tay Ray Chuan @ 2010-02-17 10:19 UTC (permalink / raw) To: pascal; +Cc: Junio C Hamano, git list Hi, On Wed, Feb 17, 2010 at 5:25 PM, Pascal Obry <pascal@obry.net> wrote: > $ git clone http://git.sv.gnu.org/r/v2p.git in case anyone is wondering, the equivalent git:// url is git://git.sv.gnu.org/v2p.git > $ git rebase --onto v3.1 HEAD~3 HEAD Why do you add the last parameter ("HEAD")? If I run the rebase without it, it works fine (ie. not on a detached HEAD). -- Cheers, Ray Chuan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-17 10:19 ` Tay Ray Chuan @ 2010-02-17 10:27 ` Pascal Obry 2010-02-17 10:46 ` Tay Ray Chuan 0 siblings, 1 reply; 12+ messages in thread From: Pascal Obry @ 2010-02-17 10:27 UTC (permalink / raw) To: Tay Ray Chuan; +Cc: Junio C Hamano, git list Tay, > Why do you add the last parameter ("HEAD")? If I run the rebase > without it, it works fine (ie. not on a detached HEAD). Right, without the final HEAD it is working. But it ought to work with it too. Hence my report. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-17 10:27 ` Pascal Obry @ 2010-02-17 10:46 ` Tay Ray Chuan 2010-02-17 11:18 ` Pascal Obry 0 siblings, 1 reply; 12+ messages in thread From: Tay Ray Chuan @ 2010-02-17 10:46 UTC (permalink / raw) To: pascal; +Cc: Junio C Hamano, git list Hi, On Wed, Feb 17, 2010 at 6:27 PM, Pascal Obry <pascal@obry.net> wrote: >> Why do you add the last parameter ("HEAD")? If I run the rebase >> without it, it works fine (ie. not on a detached HEAD). > > Right, without the final HEAD it is working. But it ought to work with > it too. Hence my report. In your original report though, you didn't say "HEAD"; you used a branch. I quote: On Wed, Feb 3, 2010 at 1:49 AM, Pascal Obry <pascal@obry.net> wrote: > > It seems to me that: > > $ git co topic > $ git rebase --onto master topic~2 topic I'm not trying to nit-pick, but it does matter - "git rebase --onto foo baz~x baz" and "git rebase --onto foo HEAD~x HEAD" are quite different. According to the docs, the last parameter <branch> specifies the branch to checkout to first before the rebasing takes place. Therefore, I believe the behaviour you're experiencing when you specify "HEAD" for the <branch> parameter is correct - git does a "git checkout $(git rev-parse HEAD)", so you start the rebase on a detached HEAD. -- Cheers, Ray Chuan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Question about git rebase --onto 2010-02-17 10:46 ` Tay Ray Chuan @ 2010-02-17 11:18 ` Pascal Obry 0 siblings, 0 replies; 12+ messages in thread From: Pascal Obry @ 2010-02-17 11:18 UTC (permalink / raw) To: Tay Ray Chuan; +Cc: Junio C Hamano, git list Tay, > I'm not trying to nit-pick, but it does matter - "git rebase --onto > foo baz~x baz" and "git rebase --onto foo HEAD~x HEAD" are quite > different. Ok, so this was a misunderstanding on my side. Indeed using: $ git rebase --onto v3.1 po/new-context-support~3 po/new-context-support Works fine! Obviously still learning Git :) Thanks. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-02-17 11:18 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-02-02 17:49 Question about git rebase --onto Pascal Obry 2010-02-02 18:11 ` Junio C Hamano 2010-02-02 18:15 ` Junio C Hamano 2010-02-02 18:19 ` Pascal Obry 2010-02-04 1:12 ` Junio C Hamano 2010-02-04 16:46 ` Pascal Obry 2010-02-04 16:50 ` Junio C Hamano 2010-02-17 9:25 ` Pascal Obry 2010-02-17 10:19 ` Tay Ray Chuan 2010-02-17 10:27 ` Pascal Obry 2010-02-17 10:46 ` Tay Ray Chuan 2010-02-17 11:18 ` Pascal Obry
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).