append(newRoot.DiffIDs) without element does nothing, so it's probably not what was intended. Changed code to perform a slice copying instead. Fixes #38834. Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>