Git - Rename git.fetchBeforeCheckout to git.pullBeforeCheckout (#162303)

Rename git.fetchBeforeCheckout to git.pullBeforeCheckout
This commit is contained in:
Ladislau Szomoru 2022-09-30 09:42:20 +02:00 committed by GitHub
parent 9cad027389
commit 9bc43c7f8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -2330,11 +2330,11 @@
"default": false,
"description": "%config.rebaseWhenSync%"
},
"git.fetchBeforeCheckout": {
"git.pullBeforeCheckout": {
"type": "boolean",
"scope": "resource",
"default": false,
"description": "%config.fetchBeforeCheckout%"
"description": "%config.pullBeforeCheckout%"
},
"git.fetchOnPull": {
"type": "boolean",

View file

@ -200,7 +200,7 @@
"config.rebaseWhenSync": "Force git to use rebase when running the sync command.",
"config.confirmEmptyCommits": "Always confirm the creation of empty commits for the 'Git: Commit Empty' command.",
"config.fetchOnPull": "When enabled, fetch all branches when pulling. Otherwise, fetch just the current one.",
"config.fetchBeforeCheckout": "Controls whether a branch that does not have outgoing commits is fast-forwarded before it is checked out.",
"config.pullBeforeCheckout": "Controls whether a branch that does not have outgoing commits is fast-forwarded before it is checked out.",
"config.pullTags": "Fetch all tags when pulling.",
"config.pruneOnFetch": "Prune when fetching.",
"config.autoStash": "Stash any changes before pulling and restore them after successful pull.",

View file

@ -38,9 +38,9 @@ class CheckoutItem implements QuickPickItem {
}
const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
const fetchBeforeCheckout = config.get<boolean>('fetchBeforeCheckout', false) === true;
const pullBeforeCheckout = config.get<boolean>('pullBeforeCheckout', false) === true;
if (fetchBeforeCheckout) {
if (pullBeforeCheckout) {
await this.repository.fastForwardBranch(this.ref.name!);
}