@@ -23,7 +23,7 @@ func NewGpgHelper(c *HelperCommon) *GpgHelper {
23
23
// WithWaitingStatus we get stuck there and can't return to lazygit. We could
24
24
// fix this bug, or just stop running subprocesses from within there, given that
25
25
// 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 {
27
27
useSubprocess := self .c .Git ().Config .NeedsGpgSubprocess (configKey )
28
28
if useSubprocess {
29
29
success , err := self .c .RunSubprocess (cmdObj )
@@ -32,20 +32,20 @@ func (self *GpgHelper) WithGpgHandling(cmdObj oscommands.ICmdObj, configKey git_
32
32
return err
33
33
}
34
34
}
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 {
36
36
return err
37
37
}
38
38
39
39
return err
40
40
} else {
41
- return self .runAndStream (cmdObj , waitingStatus , onSuccess )
41
+ return self .runAndStream (cmdObj , waitingStatus , onSuccess , refreshScope )
42
42
}
43
43
}
44
44
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 {
46
46
return self .c .WithWaitingStatus (waitingStatus , func (gocui.Task ) error {
47
47
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 })
49
49
return fmt .Errorf (
50
50
self .c .Tr .GitCommandFailed , self .c .UserConfig ().Keybinding .Universal .ExtrasMenu ,
51
51
)
@@ -57,6 +57,6 @@ func (self *GpgHelper) runAndStream(cmdObj oscommands.ICmdObj, waitingStatus str
57
57
}
58
58
}
59
59
60
- return self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC })
60
+ return self .c .Refresh (types.RefreshOptions {Mode : types .ASYNC , Scope : refreshScope })
61
61
})
62
62
}
0 commit comments