Skip to content

Add parent path to git clone command - #85459

Merged
João Moreno (joaomoreno) merged 1 commit into
microsoft:masterfrom
vially:git-clone-dest-path
Nov 28, 2019
Merged

Add parent path to git clone command#85459
João Moreno (joaomoreno) merged 1 commit into
microsoft:masterfrom
vially:git-clone-dest-path

Conversation

@vially

@vially Valentin Hăloiu (vially) commented Nov 23, 2019

Copy link
Copy Markdown
Contributor

This PR fixes #85458 by adding another argument for the parent directory to the git.clone command (see #85458 for more details about the use-case that this pull-request is trying to address)

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Nov 23, 2019

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@joaomoreno

Copy link
Copy Markdown
Contributor

Thanks! 🎆

@vially
Valentin Hăloiu (vially) deleted the git-clone-dest-path branch November 28, 2019 13:18
if (!parentPath) {
const config = workspace.getConfiguration('git');
let defaultCloneDirectory = config.get<string>('defaultCloneDirectory') || os.homedir();
defaultCloneDirectory = defaultCloneDirectory.replace(/^~/, os.homedir());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to do this for provided parent paths as well; currently running a command to clone into ~/Github displays an error João Moreno (@joaomoreno)

image

@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.

Allow passing parent directory to git.clone command

4 participants