Skip to content

Add parent path to git clone command#85459

Merged
joaomoreno merged 1 commit intomicrosoft:masterfrom
vially:git-clone-dest-path
Nov 28, 2019
Merged

Add parent path to git clone command#85459
joaomoreno merged 1 commit intomicrosoft:masterfrom
vially:git-clone-dest-path

Conversation

@vially
Copy link
Contributor

@vially vially commented Nov 23, 2019

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
Copy link

msftclas commented Nov 23, 2019

CLA assistant check
All CLA requirements met.

@joaomoreno joaomoreno added the git GIT issues label Nov 25, 2019
@joaomoreno joaomoreno added this to the November 2019 milestone Nov 28, 2019
@joaomoreno joaomoreno merged commit f8b2bb8 into microsoft:master Nov 28, 2019
@joaomoreno
Copy link
Member

Thanks! 🎆

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