hanw / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

repo branch rebase failure when you made the last commit #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: repo version v1.7.4
Environment: Ubuntu 10.10 64bit

What steps will reproduce the problem?
I'm describing this from the Android Open Source release tree, as its easily 
reproducible. However, I'm coming across this exact issue when switching 
between branches of the manifest file in our repo project when the last 
committed checkin was made by the person switching branches.

    $ 3085 > repo init -u git://android.git.kernel.org/platform/manifest.git 

    $ 3086 > repo init -b froyo

    .repo/manifests/: manifest switched gingerbread...froyo
    .repo/manifests/: discarding 8 commits removed from upstream

    Your Name  [GS]: Your Email [gs@mail.com]: 

    Your identity is: GS <gs@mail.com>
    is this correct [y/n]? y

    repo initialized in /homes/$/android-google/google

This has all worked as expected, I got switched to the gingerbread branch. I 
can swap happily between the gingerbread and froyo branches.

If, however, I specify my email as :
    Your Email [gs@mail.com]: initial-contribution@android.com
The above email is the person who made the commits to the android manifest, 
initially, it works as intended as it checked out the repository as 
gs@mail.com. However, look what happens when I run it a second time:

    $ 3089 > repo init -b gingerbread
    .repo/manifests/: manifest switched froyo...gingerbread
    project .repo/manifests/
    First, rewinding head to replay your work on top of it...
    Applying: capture branch history
    Applying: capture branch history
    Applying: capture branch history

    Your Name  [GS]: 
    Your Email [initial-contribution@android.com]: 

    Your identity is: GS <initial-contribution@android.com>
    is this correct [y/n]? y

    repo initialized in /homes/$/android-google/google

Notice all those Applying: lines - as far as I can tell, it thinks it has local 
commits to rebase onto the destination branch even though no local commits have 
been made.

Of course, when you run it a 3rd time, it gets even worse ....

    $ 3090 > repo init -b froyo
    .repo/manifests/: manifest switched gingerbread...froyo
    .repo/manifests/: discarding 2 commits removed from upstream
    project .repo/manifests/
    First, rewinding head to replay your work on top of it...
    Applying: Initial manifest for gingerbread
    Applying: pin the development project, for now
    Applying: Revert "pin the development project, for now"
    Applying: capture branch history
    Applying: capture branch history
    Applying: capture branch history
    Applying: capture branch history
    Applying: capture branch history
    Applying: capture branch history
    Using index info to reconstruct a base tree...
    <stdin>:15: trailing whitespace.

    <stdin>:17: trailing whitespace.

    warning: 2 lines add whitespace errors.
    Falling back to patching base and 3-way merge...
    No changes -- Patch already applied.
    Applying: capture branch history
    Using index info to reconstruct a base tree...
    <stdin>:15: trailing whitespace.

    <stdin>:17: trailing whitespace.

    warning: 2 lines add whitespace errors.
    Falling back to patching base and 3-way merge...
    No changes -- Patch already applied.
    Applying: capture branch history
    Using index info to reconstruct a base tree...
    <stdin>:15: trailing whitespace.

    <stdin>:17: trailing whitespace.

    warning: 2 lines add whitespace errors.
    Falling back to patching base and 3-way merge...
    No changes -- Patch already applied.

    Your Name  [GS]: 
    Your Email [initial-contribution@android.com]: 

    Your identity is: GS <initial-contribution@android.com>
    is this correct [y/n]? y

    repo initialized in /homes/$/android-google/google

Original issue reported on code.google.com by goo...@garyksmith.co.uk on 16 Mar 2011 at 7:50