-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtin/pull.c: use config value of autostash
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: 1. --autostash passed in through command line $ git pull --autostash merge/rebase should get --autostashed passed through 2. --rebase passed in, rebase.autostash set in config $ git config rebase.autostash true $ git pull --rebase merge/rebase should get --autostash from config 3. --no-autostash passed in $ git pull --no-autostash --no-autostash should be passed into merge/rebase 4. 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. Co-authored-by: "Tilman Vogel" <tilman.vogel@web.de> Co-authored-by: "Philippe Blain" <levraiphilippeblain@gmail.com> Signed-Off-by: "John Cai" <johncai86@gmail.com>
- Loading branch information
1 parent
194610f
commit 15eb361
Showing
2 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters