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

Re: [PATCH] t3424: new rebase testcase documenting a stat-dirty-like failure

From
Elijah Newren <newren@gmail.com>
Date
Feb 19, 2020, 16:00 UTC
Message-ID
<CABPp-BFij++-6P2ht1EacGXaX4vA_CuBQEfz6M9w9CadXHC8Jw@mail.gmail.com>
In-Reply-To
<deae766d-f552-2e30-fb49-e7e187ee984b@gmail.com>
Hi Phillip,
On Wed, Feb 19, 2020 at 3:01 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 56 quoted lines
>
> Hi Elijah
>
> On 18/02/2020 15:59, Elijah Newren wrote:
> > On Tue, Feb 18, 2020 at 7:05 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
> >>
> >> Hi Elijah
> >>
> >> On 17/02/2020 19:12, Elijah Newren wrote:
> >>> I forgot to add some cc's in GitGitGadget before submitting; adding now...
> >>>
> >>> On Mon, Feb 17, 2020 at 9:15 AM Elijah Newren via GitGitGadget
> >>> <gitgitgadget@gmail.com> wrote:
> >>>>
> >>>> From: Elijah Newren <newren@gmail.com>
> >>>>
> >>>> A user discovered a case where they had a stack of 20 simple commits to
> >>>> rebase, and the rebase would succeed in picking the first commit and
> >>>> then error out with a pair of "Could not execute the todo command" and
> >>>> "Your local changes to the following files would be overwritten by
> >>>> merge" messages.
> >>>>
> >>>> Their steps actually made use of the -i flag, but I switched it over to
> >>>> -m to make it simpler to trigger the bug.  With that flag, it bisects
> >>>> back to commit 68aa495b590d (rebase: implement --merge via the
> >>>> interactive machinery, 2018-12-11), but that's misleading.  If you
> >>>> change the -m flag to --keep-empty, then the problem persists and will
> >>>> bisect back to 356ee4659bb5 (sequencer: try to commit without forking
> >>>> 'git commit', 2017-11-24)
> >>>>
> >>>> After playing with the testcase for a bit, I discovered that added
> >>>> --exec "sleep 1" to the command line makes the rebase succeed, making me
> >>>> suspect there is some kind of discard and reloading of caches that lead
> >>>> us to believe that something is stat dirty, but I didn't succeed in
> >>>> digging any further than that.
>
> I think `--exec true` would be better as it makes it clear that it's not
> a timing issue. I've changed do_recursive_merge() to print the mtime and
> mode of "DS" before and after the merge which gives
>
> HEAD is now at abd8fe3 side1
> Rebasing (1/2) # picking commit1
> DS mtime, mode before merge 1582109854, 120000
> DS mtime, mode after merge 0, 120000
> Rebasing (2/2) # picking commit2
> DS mtime, mode before merge 0, 120000
> error: Your local changes to the following files would be overwritten by
> merge:
>         DS
>
> So it looks like the problem is that when we pick commit1 we don't
> update the index entry for DS properly in merge_trees()
>
> Best Wishes
>
> Phillip

Oh, indeed, so this was my bug. Thanks for jumping in and investigating; I probably should have found that lead but I just didn't. Anyway, with your extra information I dug around for a bit and I think I found the fix. I'll post it soon.

Previous: Phillip WoodNext: Junio C Hamano
Message 6 of 20 in “t3424: new rebase testcase documenting a stat-dirty-like failure”
  1. t3424: new rebase testcase documenting a stat-dirty-like failureElijah Newren via GitGitGadget, Feb 17, 2020
  2. Elijah NewrenFeb 17, 2020
  3. Phillip WoodFeb 18, 2020
  4. Elijah NewrenFeb 18, 2020
  5. Phillip WoodFeb 19, 2020
  6. Elijah NewrenFeb 19, 2020
  7. Junio C HamanoFeb 19, 2020
  8. Phillip WoodFeb 19, 2020
  9. Johannes SchindelinFeb 18, 2020
  10. Elijah NewrenFeb 18, 2020
  11. t3424: new rebase testcase documenting a stat-dirty-like failureElijah Newren via GitGitGadget, Feb 18, 2020
  12. Junio C HamanoFeb 18, 2020
  13. Elijah NewrenFeb 18, 2020
  14. t3433: new rebase testcase documenting a stat-dirty-like failureElijah Newren via GitGitGadget, Feb 18, 2020
  15. 0/2 t3433: new rebase testcase documenting a stat-dirty-like failureElijah Newren via GitGitGadget, Feb 19, 2020
  16. 2/2 merge-recursive: fix the refresh logic in update_file_flagsElijah Newren via GitGitGadget, Feb 19, 2020
  17. Junio C HamanoFeb 19, 2020
  18. Elijah NewrenFeb 19, 2020
  19. Junio C HamanoFeb 19, 2020
  20. 1/2 t3433: new rebase testcase documenting a stat-dirty-like failureElijah Newren via GitGitGadget, Feb 19, 2020

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.