Re: [PATCH v2 0/4] fix "rebase -i --root" corrupting root commit
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 1, 2018, 06:22 UTC
- Message-ID
- <CAPig+cRe1R1YWpLaXVtTmwhaJiz2dONU83qtn_+XhaRevjn2fQ@mail.gmail.com>
- In-Reply-To
- <CAE1pOi3oeBEyD8skwfLAd7JviGYOUZaZwj3u9pznM4eLAR7fDQ@mail.gmail.com>
On Tue, Jul 31, 2018 at 9:30 PM Hilco Wijbenga <hilco.wijbenga@gmail.com> wrote:
Show 16 quoted lines
> On Tue, Jul 31, 2018 at 12:33 AM, Eric Sunshine <sunshine@sunshineco.com> wrote: > > This is a re-roll of [1] which fixes sequencer bugs resulting in commit > > object corruption when "rebase -i --root" swaps in a new commit as root. > > Unfortunately, those bugs made it into v2.18.0 and have already > > corrupted at least one repository (a local project of mine). Patches 3/4 > > and 4/4 are new. > > Does this also fix losing the initial commit if it is empty? > > git init ; git commit -m 'Initial commit' --allow-empty ; touch > file.txt ; git add file.txt ; git commit -m 'Add file.txt' ; git > rebase --root > > I would expect there to be 2 commits but the first one has > disappeared. (This usually happens with "git rebase -i --root" early > on in a new project.)
This series should have no impact on that issue; it is fixing root commit object corruption, and does not touch or change how the commit graph is maintained or how the rebasing machinery itself works (and the --allow-empty stuff is part of that machinery).
As Dscho is cc:'d already, perhaps he can chime in as a resident expert.
By the way, what happens if you use --keep-empty while rebasing?