@@ -23,7 +23,7 @@ func NewGpgHelper(c *HelperCommon) *GpgHelper {
2323// WithWaitingStatus we get stuck there and can't return to lazygit. We could
2424// fix this bug, or just stop running subprocesses from within there, given that
2525// we don't need to see a loading status if we're in a subprocess.
26- func (self * GpgHelper ) WithGpgHandling (cmdObj oscommands.ICmdObj , configKey git_commands.GpgConfigKey , waitingStatus string , onSuccess func () error ) error {
26+ func (self * GpgHelper ) WithGpgHandling (cmdObj oscommands.ICmdObj , configKey git_commands.GpgConfigKey , waitingStatus string , onSuccess func () error , refreshScope []types. RefreshableView ) error {
2727 useSubprocess := self .c .Git ().Config .NeedsGpgSubprocess (configKey )
2828 if useSubprocess {
2929 success , err := self .c .RunSubprocess (cmdObj )
@@ -32,20 +32,20 @@ func (self *GpgHelper) WithGpgHandling(cmdObj oscommands.ICmdObj, configKey git_
3232 return err
3333 }
3434 }
35- if err := self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC }); err != nil {
35+ if err := self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC , Scope : refreshScope }); err != nil {
3636 return err
3737 }
3838
3939 return err
4040 } else {
41- return self .runAndStream (cmdObj , waitingStatus , onSuccess )
41+ return self .runAndStream (cmdObj , waitingStatus , onSuccess , refreshScope )
4242 }
4343}
4444
45- func (self * GpgHelper ) runAndStream (cmdObj oscommands.ICmdObj , waitingStatus string , onSuccess func () error ) error {
45+ func (self * GpgHelper ) runAndStream (cmdObj oscommands.ICmdObj , waitingStatus string , onSuccess func () error , refreshScope []types. RefreshableView ) error {
4646 return self .c .WithWaitingStatus (waitingStatus , func (gocui.Task ) error {
4747 if err := cmdObj .StreamOutput ().Run (); err != nil {
48- _ = self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC })
48+ _ = self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC , Scope : refreshScope })
4949 return fmt .Errorf (
5050 self .c .Tr .GitCommandFailed , self .c .UserConfig ().Keybinding .Universal .ExtrasMenu ,
5151 )
@@ -57,6 +57,6 @@ func (self *GpgHelper) runAndStream(cmdObj oscommands.ICmdObj, waitingStatus str
5757 }
5858 }
5959
60- return self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC })
60+ return self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC , Scope : refreshScope })
6161 })
6262}
0 commit comments