Skip to content

Add option to automatically stash changes before performing git pull - #59849

Merged
João Moreno (joaomoreno) merged 1 commit into
microsoft:masterfrom
vladimir-kotikov:15671_autostash_on_pull
Jan 4, 2019
Merged

Add option to automatically stash changes before performing git pull#59849
João Moreno (joaomoreno) merged 1 commit into
microsoft:masterfrom
vladimir-kotikov:15671_autostash_on_pull

Conversation

@vladimir-kotikov

@vladimir-kotikov Vladimir Kotikov (vladimir-kotikov) commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

This is an attempt to implement #15671 automatic stashing before pulling any changes (for both 'pull' and 'sync' commands). The behavior is controlled by new git.autoStash which is false by default. Stashing is performed only if any tracked files are changed, any changes in untracked/ignored files don't trigger this scenario.

Also did a small refactoring to dedupe and reuse some code between pull, pullWithRebase and pullFrom methods 😉

@joaomoreno

Copy link
Copy Markdown
Contributor

Thanks! 🍻

Ended up refactoring a little bit further.

@joaomoreno
João Moreno (joaomoreno) merged commit ae2d0cd into microsoft:master Jan 4, 2019
@vladimir-kotikov
Vladimir Kotikov (vladimir-kotikov) deleted the 15671_autostash_on_pull branch January 4, 2019 15:20
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

git GIT issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants