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

Re: Possible git bug

From
WSWesley Schwengle <wesley@schwengle.net>
Date
Sep 16, 2021, 12:07 UTC
Message-ID
<c7949156-a7e5-085f-4779-82d0538a4d72@schwengle.net>
In-Reply-To
<YULYG970Ltnbshdn@nand.local>
On 9/16/21 1:37 AM, Taylor Blau wrote:
> FWIW, I had to tweak this script a little, since file.txt is untracked
> before it is added initially. (So a "git add file.txt" before this first
> commit is required.)
Oh sorry! I overlooked that part.
> But even after this, I got exactly what I expected from this script
> (which was that your "foo" branch had three commits before and after).
> Is there something else interesting going on with your setup that might
> explain why I can't reproduce this?

Oh, I found it.. Replace `git rebase master' with `git rebase' in the reproduction path.

Disregard my post, it seems this is documented behavior in the rebase man-page. When you have an upstream configured and you don't specify it on the command line, --fork-point is used, while if you specify the upstream --no-fork-point is used. `git rebase master --fork-point' exhibits the same as I was seeing. Although I'm now completely confused by this behavior. It doesn't make sense to me.

This happens:

We are on a branch, we merge it into another branch. We undo the merge because reasons. Now we git rebase, without the upstream, because we've set it. Fork-point is used now, because we haven't specified an upstream, but we did set it and git merge-base decides, oh, we had those commits in master but these where dropped so we drop them in this branch as well.

New question, is there a way to tell rebase to NOT use fork-point via git-config in this situation?

Cheers, Wesley

-- 
Wesley Schwengle
E: wesley@schwengle.net
Previous: Taylor BlauNext: wesley@schwengle.net
Message 3 of 20 in “Possible git bug”
  1. Wesley SchwengleSep 16, 2021
  2. Taylor BlauSep 16, 2021
  3. Wesley SchwengleSep 16, 2021
  4. wesley@schwengle.netSep 16, 2021
  5. Document `rebase.forkpoint` in rebase man pagewesley@schwengle.net, Sep 16, 2021
  6. Junio C HamanoSep 16, 2021
  7. Junio C HamanoSep 16, 2021
  8. wesley@schwengle.netSep 16, 2021
  9. Document `rebase.forkpoint` in rebase man pagewesley@schwengle.net, Sep 16, 2021
  10. Junio C HamanoSep 16, 2021
  11. Wesley SchwengleSep 16, 2021
  12. Junio C HamanoSep 16, 2021
  13. Wesley SchwengleSep 20, 2021
  14. wesley@schwengle.netSep 16, 2021
  15. Document `rebase.forkpoint` in rebase man pagewesley@schwengle.net, Sep 16, 2021
  16. Junio C HamanoSep 20, 2021
  17. Junio C HamanoSep 16, 2021
  18. Wesley SchwengleSep 16, 2021
  19. Junio C HamanoSep 16, 2021
  20. Wesley SchwengleSep 16, 2021

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.