mirror of
https://github.com/cooperspencer/gickup
synced 2024-11-08 12:09:18 +01:00
Issue 200 (#203)
* force fetch * do not fetch * log push * log clone too
This commit is contained in:
parent
4f6317326a
commit
76bcf763aa
@ -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
|
||||
|
2
main.go
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user