Skip to content

Commit 49966fd

Browse files
committed
Added GIT pull before commit, fix
1 parent a25bde4 commit 49966fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/store/git/git.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,6 @@ func (s *Store) Commit() (changed bool, err error) {
199199
return false, nil
200200
}
201201

202-
err = s.Git("pull", "-s", "recursive", "-X", "ours")
203-
if err != nil {
204-
return false, fmt.Errorf("failed to git pull -s recursive -X ours: %v", err)
205-
}
206-
207202
err = s.Git("add", "-A")
208203
if err != nil {
209204
return false, fmt.Errorf("failed to git add -A: %v", err)
@@ -237,6 +232,11 @@ func (s *Store) commitAndPush() {
237232
return
238233
}
239234

235+
err = s.Git("pull", "-s", "recursive", "-X", "ours", "--no-edit")
236+
if err != nil {
237+
return false, fmt.Errorf("failed to git pull -s recursive -X ours --no-edit: %v", err)
238+
}
239+
240240
err = s.Push()
241241
if err != nil {
242242
s.Logger.Errorf("%v", err)

0 commit comments

Comments
 (0)