diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-31 22:46:42 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 11:00:15 +1100 |
commit | 7364525bf5ae7b6b4ff8f0e4381e1014726219ad (patch) | |
tree | 1014f1c8e1dcd6aace604db674ac816a1252cae8 /pkg/commands/patch/patch_manager.go | |
parent | 54910fdb76f8a699d2cfb96459b75b60485fd3f7 (diff) |
do not show commit files of another parent as added to the patch
Diffstat (limited to 'pkg/commands/patch/patch_manager.go')
-rw-r--r-- | pkg/commands/patch/patch_manager.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/commands/patch/patch_manager.go b/pkg/commands/patch/patch_manager.go index ccb2a1081..3d6a076e8 100644 --- a/pkg/commands/patch/patch_manager.go +++ b/pkg/commands/patch/patch_manager.go @@ -222,7 +222,11 @@ func (p *PatchManager) RenderAggregatedPatchColored(plain bool) string { return result } -func (p *PatchManager) GetFileStatus(filename string) PatchStatus { +func (p *PatchManager) GetFileStatus(filename string, parent string) PatchStatus { + if parent != p.To { + return UNSELECTED + } + info, ok := p.fileInfoMap[filename] if !ok { return UNSELECTED |