# Issue with git rebase

3 messages from 2010-09-14 to 2010-09-14. Participants: Rob Aldred, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/25099

## Rob Aldred, 2010-09-14 12:39

Subject: Issue with git rebase
Message-ID: <AANLkTikUE1q-MrOsc3QOc1x0UHdLJn6nf7yGJZ=q_qqP@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikUE1q-MrOsc3QOc1x0UHdLJn6nf7yGJZ%3Dq_qqP%40mail.gmail.com
In-Reply-To: <AANLkTikWPkJ+8DJn5KZXfVw460HRY3Ui-xDZ_TR1X_Xg@mail.gmail.com>

```
Hey, I have a problem with rebase which i suspect is not very common
I'm trying to repair a commit where over 100,000 lines including a
diff were commited to the commit message.
I have followed the manual here: http://bit.ly/9uVReJ
That produces an error when it reaches the bad commit, heres the output:

    First, rewinding head to replay your work on top of it...
    Applying: fixes #2791 - added page count back in
    Applying: fixes #2399 - commenting out code for starting and
restarting solr/sunspot on production sites
    Applying: fixes #2361 - all selenium features now pass
    Applying: fixes #2797 - fixed checkout footer
    Applying: Implementing cartridge chooser wizard, Showing featured
products on the homepage and improving the printer inks page
     .......the rest of the massive 100000+ line commit message......
    /usr/local/git/libexec/git-core/git-am: line 765:
/usr/local/git/libexec/git-core/git: Argument list too long

The other way I have tried is suggested on stack overflow and other places,
`git rebase -i bad_commits_parent`
So i get the editor popup with the list of pick lines and commit
messages, it also includes the huge 100000 line message of the bad
commit
so I remove the rubbish from the editor leaving the following:

    pick 9ca499d fixes #2791 - added page count back in
    pick 6554bab fixes #2399 - commenting out code for starting and
restarting solr/sunspot on production sites
    pick fcd461a fixes #2361 - all selenium features now pass
    pick abedb79 fixes #2797 - fixed checkout footer
    pick 2860581 fixes #2757 Tidying up search results partial added
in filtering feature for search added filter search controller
refactored filter helpers to help with testing added string method for
filter values
    pick 010b596 Improving printer type and printer type category pages
    reword e00b910 remove the full printer file we dont need it
    pick 46d0831 Show the show the printer picker on printer type category pages
    pick 7c0a850 - printer email now works like all other jobs - price
band class should be called access via root from
CartridgeSave::PriceBand
    pick 96423bb - link to background jobs - add indexes to
background_job_errors
    pick aa5fba2 - tables are missing loads of indexes, so added a shed load
    pick ee8d5e2 - index on status for orders, could get messy without
    pick 2de051a remove js logging
    pick 625243c fixes to specs for import mailer after rejig of jobs
    pick cbaafa1 * Use 'homepage' tag instead of 'featured' for
featured products on homepage.  * Show border around printer makes on
printer type pages  * Resized konica minolta image so it isn't so
large
    pick 2b1ea09 customer id index already exists on cards
    pick d4d4d7a Fixing a couple of failing features
    pick 6856c1e emails seem to be missing :format :html form urls, weird.
    pick fbfb16b renaming TallyGenicom printer brand image
    pick f02966a fixes #2757 - fixes problems with using pagination on
the filtering
    # Rebase 6fe8075..f02966a onto 6fe8075
    #
    # Commands:
    #  p, pick = use commit
    #  r, reword = use commit, but edit the commit message
    #  e, edit = use commit, but stop for amending
    #  s, squash = use commit, but meld into previous commit
    #  f, fixup = like "squash", but discard this commit's log message
    #
    # If you remove a line here THAT COMMIT WILL BE LOST.
    # However, if you remove everything, the rebase will be aborted.

i get the following out put:
Successfully rebased and updated refs/heads/master.

I'm left at the the parent of the bad commit anything newer including
the bad commit is gone.
I can only assume something happened internally of git and it stopped
at the bad commit.
I'm about to resort to manually cherry picking all the recent commits
and reapply everything manually.

Hope you can help.

Many thanks
Rob

```

## Ævar Arnfjörð Bjarmason, 2010-09-14 12:43

Subject: Re: Issue with git rebase
Message-ID: <AANLkTikA7WpyiZCq43+vdUBri5X9pi3odkfRYd4jMXwR@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikA7WpyiZCq43%2BvdUBri5X9pi3odkfRYd4jMXwR%40mail.gmail.com
In-Reply-To: <AANLkTikUE1q-MrOsc3QOc1x0UHdLJn6nf7yGJZ=q_qqP@mail.gmail.com>

```
On Tue, Sep 14, 2010 at 12:39, Rob Aldred <raldred@gmail.com> wrote:
> Hey, I have a problem with rebase which i suspect is not very common
> I'm trying to repair a commit where over 100,000 lines including a
> diff were commited to the commit message.
> I have followed the manual here: http://bit.ly/9uVReJ
> That produces an error when it reaches the bad commit, heres the output:
>
>    First, rewinding head to replay your work on top of it...
>    Applying: fixes #2791 - added page count back in
>    Applying: fixes #2399 - commenting out code for starting and
> restarting solr/sunspot on production sites
>    Applying: fixes #2361 - all selenium features now pass
>    Applying: fixes #2797 - fixed checkout footer
>    Applying: Implementing cartridge chooser wizard, Showing featured
> products on the homepage and improving the printer inks page
>     .......the rest of the massive 100000+ line commit message......
>    /usr/local/git/libexec/git-core/git-am: line 765:
> /usr/local/git/libexec/git-core/git: Argument list too long

What version of Git is this, and what does it have on git-am line 765?

How does it look under GIT_TRACE=1 ?

In cases like these you can extend the maximum argument list that the
OS can take as a workaround.

```

## Rob Aldred, 2010-09-14 13:10

Subject: Re: Issue with git rebase
Message-ID: <AANLkTikVNUOC+ZfzsAJeSnxeXK_KzAnOuRPhVbmtZq2V@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikVNUOC%2BZfzsAJeSnxeXK_KzAnOuRPhVbmtZq2V%40mail.gmail.com
In-Reply-To: <AANLkTikA7WpyiZCq43+vdUBri5X9pi3odkfRYd4jMXwR@mail.gmail.com>

```
On 14 September 2010 13:43, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>
> What version of Git is this, and what does it have on git-am line 765?
>
> How does it look under GIT_TRACE=1 ?
>
> In cases like these you can extend the maximum argument list that the
> OS can take as a workaround.
>

hey, rapid reply thanks.
git version 1.7.0.3 (Mac Snow Leopard) compiled by macports
line 765 that errors is:
git update-ref -m "$GIT_REFLOG_ACTION: $FIRSTLINE" HEAD $commit $parent ||

hmm it seems to have worked when running it with GIT_TRACE
im sure thats didnt really fix it, very weird. it seems to have
completed successfully

Thanks for your time.


--
Rob

```
