diff options
Diffstat (limited to 'fi-prune-empty2/prune.go')
-rw-r--r-- | fi-prune-empty2/prune.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fi-prune-empty2/prune.go b/fi-prune-empty2/prune.go index e3181b2..517f9c5 100644 --- a/fi-prune-empty2/prune.go +++ b/fi-prune-empty2/prune.go @@ -291,6 +291,11 @@ func (p *Pruner) isFastForward(commit Commit) (bool, error) { } func (p *Pruner) shouldPrune(commit Commit) (bool, error) { + if commit.ExcludedParents { + // If there are any excluded parents, then we can't + // reason about it. Keep the commit. + return false, nil + } switch p.pruneEmpty { case PruneAlways: isEmpty, err := p.isEmpty(commit) |