If --no-checkout flag set on git lfs clone, fetch not pull

This commit is contained in:
Steve Streeting 2016-04-19 12:42:00 +01:00
parent 66eeea4c21
commit b6b454770b

@ -63,7 +63,13 @@ func cloneCommand(cmd *cobra.Command, args []string) {
// Now just call pull with default args
lfs.Config.CurrentRemote = "origin" // always origin after clone
pull(nil, nil)
if cloneFlags.NoCheckout {
// If --no-checkout then we shouldn't check out, just fetch instead
fetchRef("HEAD", nil, nil)
} else {
pull(nil, nil)
}
}