File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,15 +132,11 @@ func updateRepo(AdjBranch string) error {
132132
133133 branch := head .Name ().Short ()
134134
135- println ("actual branch is: " , branch )
136-
137135 worktree , err := repo .Worktree ()
138136 if err != nil {
139137 return err
140138 }
141139
142- println (head .Name ().Short (), AdjBranch )
143-
144140 if branch != AdjBranch {
145141 localBranchRef := plumbing .NewBranchReferenceName (AdjBranch )
146142 _ , err = repo .Reference (localBranchRef , false )
@@ -155,7 +151,7 @@ func updateRepo(AdjBranch string) error {
155151 Branch : localBranchRef ,
156152 Create : true ,
157153 Force : true ,
158- Hash : remoteRef .Hash (),
154+ Hash : remoteRef .Hash (),
159155 })
160156 if err != nil {
161157 println (err .Error ())
@@ -164,7 +160,7 @@ func updateRepo(AdjBranch string) error {
164160 } else {
165161 err = worktree .Checkout (& git.CheckoutOptions {
166162 Branch : localBranchRef ,
167- Force : true ,
163+ Force : true ,
168164 })
169165 }
170166 }
You can’t perform that action at this time.
0 commit comments