git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-rebase dirty index and email address bug?

From
Jeff King <peff@peff.net>
Date
Mar 4, 2008, 12:08 UTC
Message-ID
<20080304120804.GA9042@sigill.intra.peff.net>
In-Reply-To
<200803022128.14511.jgoerzen@complete.org>
On Sun, Mar 02, 2008 at 09:28:14PM -0600, John Goerzen wrote:
Show 5 quoted lines
> That repo contains some local configuration and password information.  
> However, I would be happy to make it available to you or any other Git 
> developer privately.  Could you contact me off-list if you'd like me to send 
> it to you?  The .git directory in question is about 4.5MB, and I'd be happy 
> to email it.
I was able to turn this into a much smaller test case.
What is happening is that rebase works something like:
  1. reset to "onto" commit
  2. replay each commit between "upstream" and "branch"
but there is a bug in step 1 that is leaving the bogus
"public/dispatch.fcgi" file in the index and working tree. So step 2
correctly complains that the file is already there and uncommitted.

The bug in step 1 seems to be very hard to trigger, and requires that the "branch" commit and the "onto" commit differ such that:

  - there is a file on the branch that was a directory in "onto"
  - there is a file on the branch that is new since "onto", and that
    sorts lexically after the file mentioned above
So you can see that it is rare for it to come up. :)

I'm not sure of the correct fix for the bug, but I have posted a request for help under the subject "bug in unpack_trees", so hopefully somebody more wise than I will have something to say.

-Peff
Previous: John GoerzenNext: John Goerzen
Message 7 of 8 in “git-rebase dirty index and email address bug?”
  1. John GoerzenMar 1, 2008
  2. John GoerzenMar 1, 2008
  3. Jeff KingMar 2, 2008
  4. John GoerzenMar 2, 2008
  5. Jeff KingMar 2, 2008
  6. John GoerzenMar 3, 2008
  7. Jeff KingMar 4, 2008
  8. John GoerzenMar 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.