Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added config option git.cloneDirectory, defaulting to os.homedir() #24950

Merged
merged 2 commits into from
May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,11 @@
"type": "boolean",
"description": "%config.ignoreLimitWarning%",
"default": false
},
"git.cloneDirectory": {
"type": "string",
"default": null,
"description": "%config.cloneDirectory%"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion extensions/git/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
"config.countBadge": "Controls the git badge counter",
"config.checkoutType": "Controls what type of branches are listed",
"config.ignoreLegacyWarning": "Ignores the legacy Git warning",
"config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository"
"config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository",
"config.cloneDirectory": "When cloning a new repository, the default location will be set to this directory"
}
5 changes: 4 additions & 1 deletion extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,12 @@ export class CommandCenter {
return;
}

const config = workspace.getConfiguration('git');
const cloneDirectory = config.get<string>('cloneDirectory') || os.homedir();

const parentPath = await window.showInputBox({
prompt: localize('parent', "Parent Directory"),
value: os.homedir(),
value: cloneDirectory,
ignoreFocusOut: true
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ export function registerContributions(): void {
enum: ['all', 'local', 'tags', 'remote'],
default: 'all',
description: nls.localize('checkoutType', "Controls what type of branches are listed."),
},
'git.cloneDirectory': {
type: 'string',
default: null,
description: nls.localize('cloneDirectory', "When cloning a new repository, the default location will be set to this directory."),
}
}
});
Expand Down