From 609cdd51aa1cf379a90206fb896eaae0565b4645 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Tue, 19 Dec 2017 14:13:28 -0500 Subject: [PATCH] commands: teach 'git-lfs-ls-files(1)' to work before first commit --- commands/command_ls_files.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/command_ls_files.go b/commands/command_ls_files.go index 79151368..857e891a 100644 --- a/commands/command_ls_files.go +++ b/commands/command_ls_files.go @@ -26,9 +26,10 @@ func lsFilesCommand(cmd *cobra.Command, args []string) { } else { fullref, err := git.CurrentRef() if err != nil { - Exit(err.Error()) + ref = git.RefBeforeFirstCommit + } else { + ref = fullref.Sha } - ref = fullref.Sha } showOidLen := 10