From 76bcf763aad0a959ce422752cf46a2649071d959 Mon Sep 17 00:00:00 2001 From: Andreas Wachter Date: Mon, 29 Jan 2024 12:31:36 +0100 Subject: [PATCH] Issue 200 (#203) * force fetch * do not fetch * log push * log clone too --- local/local.go | 1 + main.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/local/local.go b/local/local.go index bf62bf3..ba29d3c 100644 --- a/local/local.go +++ b/local/local.go @@ -470,6 +470,7 @@ func TempClone(repo types.Repo, tempdir string) (*git.Repository, error) { err = r.Fetch(&git.FetchOptions{ RefSpecs: []config.RefSpec{"refs/*:refs/*"}, Auth: auth, + Force: true, }) if err == git.NoErrAlreadyUpToDate { return r, nil diff --git a/main.go b/main.go index 225d3d5..4fd77a6 100644 --- a/main.go +++ b/main.go @@ -253,6 +253,7 @@ func backup(repos []types.Repo, conf *types.Conf) { log.Error(). Str("stage", "tempclone"). Str("url", r.URL). + Str("git", "clone"). Msg(err.Error()) os.RemoveAll(tempdir) continue @@ -280,6 +281,7 @@ func backup(repos []types.Repo, conf *types.Conf) { log.Error(). Str("stage", "github"). Str("url", r.URL). + Str("git", "push"). Msg(err.Error()) os.RemoveAll(tempdir) continue