aboutsummaryrefslogtreecommitdiff
path: root/lib/git
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-11-29 08:28:48 +0700
committerShulhan <ms@kilabit.info>2018-11-29 08:28:48 +0700
commitf28840b34bf8563b50e9275f6e620bcc98307acc (patch)
tree362042842d2219191b3fd65052671846096f80c9 /lib/git
parent4082ef4d06a83437c4f9f6338ad08384e8e3c0b4 (diff)
downloadpakakeh.go-f28840b34bf8563b50e9275f6e620bcc98307acc.tar.xz
lib/git: add "--force" option to fetch command
Rarely, new references may have been replaced the old one, which cause the fetch command failed.
Diffstat (limited to 'lib/git')
-rw-r--r--lib/git/git.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/git.go b/lib/git/git.go
index c5c30aad..5b15ed59 100644
--- a/lib/git/git.go
+++ b/lib/git/git.go
@@ -144,7 +144,7 @@ func FetchAll(repoDir string) (err error) {
if debug.Value == 0 {
cmd.Args = append(cmd.Args, "--quiet")
}
- cmd.Args = append(cmd.Args, "--all", "--tags")
+ cmd.Args = append(cmd.Args, "--all", "--tags", "--force")
cmd.Dir = repoDir
cmd.Stdout = _stdout
cmd.Stderr = _stderr
@@ -169,7 +169,7 @@ func FetchTags(repoDir string) error {
if debug.Value == 0 {
cmd.Args = append(cmd.Args, "--quiet")
}
- cmd.Args = append(cmd.Args, "--tags")
+ cmd.Args = append(cmd.Args, "--tags", "--force")
cmd.Dir = repoDir
cmd.Stdout = _stdout
cmd.Stderr = _stderr