File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,11 @@ func (s *Service) processCheckout(op *sdk.Operation) error {
11
11
return sdk .WrapError (err , "unable to process gitclone" )
12
12
}
13
13
14
- //Check is repo has diverged
15
- hasDiverged , err := gitRepo .HasDiverged ()
16
- if err != nil {
17
- log .Error ("Repositories> processCheckout> HasDiverged> [%s] Error: %v" , op .UUID , err )
14
+ if err := gitRepo .ResetHard ("origin/" + currentBranch ); err != nil {
15
+ log .Error ("Repositories> processCheckout> ResetHard> [%s] Error: %v" , op .UUID , err )
18
16
return err
19
17
}
20
18
21
- if hasDiverged {
22
- if err := gitRepo .ResetHard ("origin/" + currentBranch ); err != nil {
23
- log .Error ("Repositories> processCheckout> ResetHard> [%s] Error: %v" , op .UUID , err )
24
- return err
25
- }
26
- }
27
-
28
19
if op .Setup .Checkout .Branch == "" {
29
20
op .Setup .Checkout .Branch = op .RepositoryInfo .DefaultBranch
30
21
}
You can’t perform that action at this time.
0 commit comments