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

Re: [BUG] git pull --rebase ignores rebase.autostash config when fast-forwarding

From
Philip Oakley <philipoakley@iee.email>
Date
Jan 4, 2022, 12:59 UTC
Message-ID
<1240d0cd-230d-8a80-2250-37336b834834@iee.email>
In-Reply-To
<9749fa2c-b08d-c08b-ce43-041d13852d02@web.de>
On 03/01/2022 18:08, Tilman Vogel wrote:
Show 35 quoted lines
> Hi git-people,
>
> I ran into strange behavior when having rebase.autostash enabled and
> doing a git pull --rebase:
>
>> git config rebase.autostash true
>> git pull --rebase
> Updating cd9ff8a..f3c9840
> error: Your local changes to the following files would be overwritten by
> merge:
>         content
> Please commit your changes or stash them before you merge.
> Aborting
>
> Confusingly, this fixes the issue:
>
>> git config merge.autostash true
>> git pull --rebase
> Updating cd9ff8a..f3c9840
> Created autostash: c615fda
> Fast-forward
>  content | 1 +
>  1 file changed, 1 insertion(+)
> Applied autostash.
>
> Leaving me wonder why merge config options fix rebase behavior.
>
> So, in order to make it easier to check the problem, I added some
> test-cases to the git test-suite. Please see the attached patch.
>
> Or here:
> https://github.com/tvogel/git/commit/bc941f9357518a34cfa11788dfb8e7fa7f711705
>
> I did not try to find the root-cause as I am not experienced with the
> code-base but if there are questions, let me know.
Which version are you running?
There was a problem in 2.33.1 as per thread discussion:
 https://lore.kernel.org/git/YYFEE%2F2g3SiM04zx@hades.panopticon/
 (I'd searched the logs for ".autostash true")

Does that provide any guidance? -- Philip

Previous: Tilman VogelNext: Philippe Blain
Message 2 of 6 in “[BUG] git pull --rebase ignores rebase.autostash config when fast-forwarding”
  1. Tilman VogelJan 3, 2022
  2. Philip OakleyJan 4, 2022
  3. Philippe BlainJan 4, 2022
  4. Philippe BlainJan 4, 2022
  5. Tilman VogelJan 4, 2022
  6. Philippe BlainJan 4, 2022

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.