From 9be9ab0e7499dde6b38e008d2078a3eb291f707a Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Mon, 30 Sep 2024 10:52:49 +0300 Subject: [PATCH] fix: force remote name origin when using remotes (#830) --- internal/git/remote.go | 2 +- internal/lefthook/install.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/git/remote.go b/internal/git/remote.go index 467ee53f..779e5511 100644 --- a/internal/git/remote.go +++ b/internal/git/remote.go @@ -93,7 +93,7 @@ func (r *Repository) updateRemote(path, ref string) error { func (r *Repository) cloneRemote(dest, directoryName, url, ref string) error { log.Debugf("Cloning remote config repository: %v/%v", dest, directoryName) - cmdClone := []string{"git", "-C", dest, "clone", "--quiet", "--depth", "1"} + cmdClone := []string{"git", "-C", dest, "clone", "--quiet", "--origin", "origin", "--depth", "1"} if len(ref) > 0 { cmdClone = append(cmdClone, "--branch", ref) } diff --git a/internal/lefthook/install.go b/internal/lefthook/install.go index 9d7a102b..a082545a 100644 --- a/internal/lefthook/install.go +++ b/internal/lefthook/install.go @@ -149,7 +149,7 @@ func (l *Lefthook) createHooksIfNeeded(cfg *config.Config, checkHashSum, force b return nil } - log.Infof(log.Cyan("sync hooks")) + log.Infof("%s", log.Cyan("sync hooks")) var success bool defer func() {