From b6b454770b0d4d62fb0f8a9bb29139862439ac24 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Tue, 19 Apr 2016 12:42:00 +0100 Subject: [PATCH] If `--no-checkout` flag set on `git lfs clone`, fetch not pull --- commands/command_clone.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/command_clone.go b/commands/command_clone.go index 24ce18b8..6334e157 100644 --- a/commands/command_clone.go +++ b/commands/command_clone.go @@ -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) + } }