All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix bug in pull --rebase not recognizing rebase.autostash
@ 2022-01-04 21:45 John Cai
  2022-01-04 21:45 ` [PATCH 1/1] builtin/pull.c: use config value of autostash John Cai
  2022-01-04 23:32 ` [PATCH 0/1] Fix bug in pull --rebase not recognizing rebase.autostash Philippe Blain
  0 siblings, 2 replies; 15+ messages in thread
From: John Cai @ 2022-01-04 21:45 UTC (permalink / raw)
  To: git; +Cc: John Cai

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-01-14 23:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-04 21:45 [PATCH 0/1] Fix bug in pull --rebase not recognizing rebase.autostash John Cai
2022-01-04 21:45 ` [PATCH 1/1] builtin/pull.c: use config value of autostash John Cai
2022-01-04 22:46   ` Junio C Hamano
2022-01-05  3:58     ` Philippe Blain
2022-01-06 19:11       ` Junio C Hamano
2022-01-14  0:00         ` Junio C Hamano
2022-01-14  3:14           ` Philippe Blain
2022-01-14 14:09             ` John Cai
2022-01-14 19:40             ` Junio C Hamano
2022-01-14 23:33               ` Philippe Blain
2022-01-05 11:21     ` Phillip Wood
2022-01-05  3:40   ` Philippe Blain
2022-01-05  4:02     ` Philippe Blain
2022-01-05 15:50   ` Johannes Schindelin
2022-01-04 23:32 ` [PATCH 0/1] Fix bug in pull --rebase not recognizing rebase.autostash Philippe Blain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.