mirror of
https://github.com/zrepl/zrepl.git
synced 2025-01-08 23:39:04 +01:00
replication: diff does not need special case for receiver/sender == nil
This commit is contained in:
parent
3d8e552c6a
commit
ad28fd1ecb
@ -49,20 +49,9 @@ func SortVersionListByCreateTXGThenBookmarkLTSnapshot(fsvslice []*FilesystemVers
|
||||
// conflict may be a *ConflictDiverged or a *ConflictNoCommonAncestor
|
||||
func IncrementalPath(receiver, sender []*FilesystemVersion) (incPath []*FilesystemVersion, conflict error) {
|
||||
|
||||
if receiver == nil {
|
||||
panic("receiver must not be nil")
|
||||
}
|
||||
if sender == nil {
|
||||
panic("sender must not be nil")
|
||||
}
|
||||
|
||||
receiver = SortVersionListByCreateTXGThenBookmarkLTSnapshot(receiver)
|
||||
sender = SortVersionListByCreateTXGThenBookmarkLTSnapshot(sender)
|
||||
|
||||
if len(sender) == 0 {
|
||||
return []*FilesystemVersion{}, nil
|
||||
}
|
||||
|
||||
// Find most recent common ancestor by name, preferring snapshots over bookmarks
|
||||
|
||||
mrcaRcv := len(receiver) - 1
|
||||
|
Loading…
Reference in New Issue
Block a user