Git development
 help / color / mirror / Atom feed
From: "Tony Stubbs" <antony.stubbs@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git svn rebase - could not detach HEAD
Date: Thu, 7 Aug 2008 19:33:36 +1200	[thread overview]
Message-ID: <f7d8f60b0808070033g7a322ee4w9147dd51e41850c6@mail.gmail.com> (raw)
In-Reply-To: <7vd4kljnpn.fsf@gitster.siamese.dyndns.org>

Ok, woah. that's really weird... note the strange behaviour of
git-clean (i had my ide open, then clossed it. but it still acted
strange)

that seems to have got it. so are you going to apply that patch to git proper?

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git --version
git version 1.5.6.4

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git svn rebase --dry-run
Remote Branch: refs/remotes/git-svn
SVN URL: http://10.107.6.150/repos/portal/oasis/branches/oasis-cr

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git rebase git-svn
First, rewinding head to replay your work on top of it...
error: Untracked working tree file
'webnonline-db-access/target/hanson-db-access-1.0.jar' would be
overwritten by merge.
could not detach HEAD

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git clean -df
Removing .temp/
Removing Libraries/release/
Removing SiebelJavaInterface/release/
Removing SiebelJavaInterface/src/generated/
Removing SiebelJavaInterface/tmp/
Removing Utilities/.apt_src/
Removing Utilities/build/
Removing VFSecurityProviders/build/
Removing VFSecurityProviders/vfSecurityProviders.jar
Removing VFSecurityProviders/vfSecurityProviders_r1_00_01.jar

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git rebase git-svn
First, rewinding head to replay your work on top of it...
error: Untracked working tree file
'webnonline-db-access/target/hanson-db-access-1.0.jar' would be
overwritten by merge.
could not detach HEAD

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git clean -df
Removing Utilities/.apt_src/
Removing Utilities/build/

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git clean -df
Removing Utilities/.apt_src/
Removing Utilities/build/

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git clean -df

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git rebase git-svn
First, rewinding head to replay your work on top of it...
error: Untracked working tree file
'webnonline-db-access/target/hanson-db-access-1.0.jar' would be
overwritten by merge.
could not detach HEAD

<manually deleted "untracked file" here>

stubbsa@VFNZV95336 /cygdrive/c/dev
$ git rebase git-svn
First, rewinding head to replay your work on top of it...
Applying removed generated files
Applying Changed maven call method
Applying Switched dependency to project from jar
Applying Added dependency build
Applying Updated notification service build target

2008/8/7 Junio C Hamano <gitster@pobox.com>:
> "Tony Stubbs" <antony.stubbs@gmail.com> writes:
>
>> $ git svn rebase
>> First, rewinding head to replay your work on top of it...
>> could not detach HEAD
>> rebase refs/remotes/git-svn: command returned error: 1
>
> It is somewhat unfortunate that git-svn does not say anything about what
> ref it is trying to rebase onto here.  I do not use git-svn nor know much
> about the code myself, but here are some ideas.
>
>  * Try "rebase --dry-run" and see what you see from this part of the code:
>
>        sub cmd_rebase {
>                ...
>                if ($_dry_run) {
>                        print "Remote Branch: " . $gs->refname . "\n";
>                        print "SVN URL: " . $url . "\n";
>                        return;
>                }
>
>   Most interesting is what $gs->refname is;
>
>  * If you are using recent enough git (I think 1.5.2 is Ok), update your
>   copy of git-rebase like this, so that you would at least see *why* you
>   cannot detach HEAD.  It is possible that git-svn is giving a nonsense
>   ref to detach to.
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index e2d85ee..7825f88 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -376,9 +376,7 @@ fi
>
>  # Detach HEAD and reset the tree
>  echo "First, rewinding head to replay your work on top of it..."
> -git checkout "$onto^0" >/dev/null 2>&1 ||
> -       die "could not detach HEAD"
> -# git reset --hard "$onto^0"
> +git checkout -q "$onto^0" || die "could not detach HEAD"
>
>  # If the $onto is a proper descendant of the tip of the branch, then
>  # we just fast forwarded.
>



-- 
___________________________
http://stubbisms.wordpress.com/

  reply	other threads:[~2008-08-07  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07  6:49 git svn rebase - could not detach HEAD Tony Stubbs
2008-08-07  7:19 ` Tony Stubbs
2008-08-07  7:20 ` Junio C Hamano
2008-08-07  7:33   ` Tony Stubbs [this message]
2008-08-07  7:41     ` Björn Steinbrink
2008-08-07 12:53       ` Tony Stubbs
2008-08-07 14:24         ` Daniel Barkalow

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=f7d8f60b0808070033g7a322ee4w9147dd51e41850c6@mail.gmail.com \
    --to=antony.stubbs@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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