From 7364525bf5ae7b6b4ff8f0e4381e1014726219ad Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 31 Mar 2021 22:46:42 +1100 Subject: do not show commit files of another parent as added to the patch --- pkg/commands/patch/patch_manager.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/commands') 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 -- cgit v1.2.3