-
Notifications
You must be signed in to change notification settings - Fork 534
git: added Clone.NoCheckout option #705
Comments
Should be that easy as skip this line: https://github.com/src-d/go-git/blob/v4.0.0/worktree.go#L181 |
@mcuadros I didn't find where Repository's Do you think that it could be implemented by adding a flag to https://github.com/src-d/go-git/blob/v4.0.0/repository.go#L452-L478 |
Something like this: master...rykov:master |
@mcuadros I've taken another look at the documentation for Here's what the docs say for
https://git-scm.com/docs/git-clone#git-clone---recurse-submodulesltpathspec I'll add some tests and submit this as a PR |
Pretty interesting, can you please provide an example usage? |
@Nhoya So the behavior is similar to Here's a modification of the basic example from the README with this flag enabled: Info("git clone -n https://github.com/src-d/go-git")
_, err := git.PlainClone("/tmp/foo", false, &git.CloneOptions{
URL: "https://github.com/src-d/go-git",
Progress: os.Stdout,
NoCheckout: true,
})
CheckIfError(err) |
Hi and thanks for the answer So retrieving commits with
is still possible? |
Hi, i was wondering if was possible to reproduce the -n option of git clone
The text was updated successfully, but these errors were encountered: