Skip to content

Commit 993ae20

Browse files
committed
fixup! feat: add fork remote command
Fix logging
1 parent 21babae commit 993ae20

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/gui/controllers/remotes_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ func (self *RemotesController) enter(remote *models.Remote) error {
146146

147147
// Adds a new remote, refreshes and selects it, then fetches and checks out the specified branch if provided.
148148
func (self *RemotesController) addAndCheckoutRemote(remoteName string, remoteUrl string, branchToCheckout string) error {
149-
self.c.LogAction(self.c.Tr.Actions.AddRemote)
150149
err := self.c.Git().Remote.AddRemote(remoteName, remoteUrl)
151150
if err != nil {
152151
return err
@@ -201,6 +200,7 @@ func (self *RemotesController) add() error {
201200
self.c.Prompt(types.PromptOpts{
202201
Title: self.c.Tr.NewRemoteUrl,
203202
HandleConfirm: func(remoteUrl string) error {
203+
self.c.LogAction(self.c.Tr.Actions.AddRemote)
204204
return self.addAndCheckoutRemote(remoteName, remoteUrl, "")
205205
},
206206
})
@@ -272,6 +272,7 @@ func (self *RemotesController) addFork() error {
272272
return err
273273
}
274274

275+
self.c.LogAction(self.c.Tr.Actions.AddForkRemote)
275276
return self.ensureForkRemoteAndCheckout(forkUsername, remoteUrl, branchToCheckout)
276277
},
277278
})

pkg/i18n/english.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ type Actions struct {
10261026
DeleteRemoteBranch string
10271027
SetBranchUpstream string
10281028
AddRemote string
1029+
AddForkRemote string
10291030
RemoveRemote string
10301031
UpdateRemote string
10311032
ApplyPatch string
@@ -2087,6 +2088,7 @@ func EnglishTranslationSet() *TranslationSet {
20872088
DeleteRemoteBranch: "Delete remote branch",
20882089
SetBranchUpstream: "Set branch upstream",
20892090
AddRemote: "Add remote",
2091+
AddForkRemote: "Add fork remote",
20902092
RemoveRemote: "Remove remote",
20912093
UpdateRemote: "Update remote",
20922094
ApplyPatch: "Apply patch",

0 commit comments

Comments
 (0)