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

[PATCH 0/1] Fix bug in pull --rebase not recognizing rebase.autostash

From
John Cai <johncai86@gmail.com>
Date
Jan 4, 2022, 21:45 UTC
Message-ID
<20220104214522.10692-1-johncai86@gmail.com>
NOTE: this is my first patch I'm submitting through git send-email. Please let
me know if there is some convention that I'm missing. thank you in advance :)

A bug in pull.c causes merge and rebase functions to ignore rebase.autostash if it is only set in the config.

There are a couple of different scenarios that we need to be mindful of:

--autostash passed in through command line $ git pull --autostash

merge/rebase should get --autostashed passed through

--rebase passed in, rebase.autostash set in config $ git config rebase.autostash true $ git pull --rebase

merge/rebase should get --autostash from config

--no-autostash passed in $ git pull --no-autostash

--no-autostash should be passed into merge/rebase

rebase.autostash set but --rebase not used $ git config rebase.autostash true $ git pull

--autostash should not be passed into merge but not rebase

This change adjusts variable names to make it more clear which autostash setting it is modifying, and ensures --autostash is passed into the merge/rebase where appropriate.

John Cai (1):
  builtin/pull.c: use config value of autostash
 builtin/pull.c          | 15 ++++++------
 t/t5521-pull-options.sh | 51 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 7 deletions(-)
-- 
2.34.1
Next: John Cai
Message 1 of 15 in “Fix bug in pull --rebase not recognizing rebase.autostash”
  1. 0/1 Fix bug in pull --rebase not recognizing rebase.autostashJohn Cai, Jan 4, 2022
  2. 1/1 builtin/pull.c: use config value of autostashJohn Cai, Jan 4, 2022
  3. Junio C HamanoJan 4, 2022
  4. Philippe BlainJan 5, 2022
  5. Junio C HamanoJan 6, 2022
  6. Junio C HamanoJan 14, 2022
  7. Philippe BlainJan 14, 2022
  8. John CaiJan 14, 2022
  9. Junio C HamanoJan 14, 2022
  10. Philippe BlainJan 14, 2022
  11. Phillip WoodJan 5, 2022
  12. Philippe BlainJan 5, 2022
  13. Philippe BlainJan 5, 2022
  14. Johannes SchindelinJan 5, 2022
  15. 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.