You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Git: Allow option to "fetch --all" on autofetch #110811
VScode has a "git.autofetch" option which periodically fetches from upstream. However, when forking a project (which a lot of us do) you will only ever fetch from origin. In my case I want to periodically fetch from upstream too so I can have up-to-date changes from others working on the same project.
Today fetchDefault is always called. fetchAll exists and could be called instead if an option is set to true.
Example Config
It would make sense for autoFetch to take a series of options like, "all", "current", "off". But im assuming we can't modify this option now as it's being used.
"git.autofetch": true, // Most likely can't change this now"git.autofetchAll": true, // fetchAll when fetching (overriding above)
After some thought I think fetchAll makes a better default than fetchDefault because then extensions like gitlens would work better out the box on remote views.
If a developer is working from a fork it would mainly just work. If you work on a central repository (no forks) you would only have 1 remote anyway so fetchAll would continue to operate the same way.
Activity
jasonwilliams commentedon Nov 18, 2020
After some thought I think
fetchAllmakes a better default thanfetchDefaultbecause then extensions likegitlenswould work better out the box on remote views.If a developer is working from a fork it would mainly just work. If you work on a central repository (no forks) you would only have 1 remote anyway so fetchAll would continue to operate the same way.
eamodio commentedon Nov 19, 2020
I think we can probably get away with adding an
alloption togit.autofetch.jasonwilliams commentedon Nov 19, 2020
So the options for
git.autofetchwould betrue|false|“all”?jasonwilliams commentedon Nov 20, 2020
"autofetch" is
"type": "boolean"so i don't know how that will be possible https://github.com/microsoft/vscode/blob/master/extensions/git/package.json#L1647jasonwilliams commentedon Nov 21, 2020
Eric Amodio (@eamodio) I had a go at this here: #111090
What do you think?
eamodio commentedon Jan 26, 2021
Verify that setting
"git.autofetch": 'all'fetches all remotes, and still thatfalsestop auto-fetching, and thattruefetches the default remote