mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-28 18:59:00 -06:00
Add missing ==nil check to list diff (#2362)
This isn't triggering any problem in particular, I just noticed it. All it meant was that noms log might take unnecessarily long with list diff when there are a lot of changes.
This commit is contained in:
@@ -82,7 +82,7 @@ func diffLists(w diffWriter, p types.Path, v1, v2 types.List) (err error) {
|
||||
|
||||
if splice.SpRemoved == splice.SpAdded {
|
||||
// Heuristic: list only has modifications.
|
||||
for i := uint64(0); i < splice.SpRemoved; i++ {
|
||||
for i := uint64(0); i < splice.SpRemoved && err == nil; i++ {
|
||||
lastEl := v1.Get(splice.SpAt + i)
|
||||
newEl := v2.Get(splice.SpFrom + i)
|
||||
if shouldDescend(lastEl, newEl) {
|
||||
|
||||
Reference in New Issue
Block a user