Nodes in trees were always printed with a `+` in diff, regardless of
whether or not a dir was added or removed. Let's use the mode we were
passed in printDir().

Closes #3685
This commit is contained in:
Alexander Neumann committed 2022-03-29 21:05:11 +02:00
1 parent a08b95c497
commit 206550a246
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -170,7 +170,7 @@ func (c *Comparer) printDir(ctx context.Context, mode string, stats *DiffStat, b
if node.Type == "dir" {
name += "/"
}
c.printChange(NewChange(name, "+"))
c.printChange(NewChange(name, mode))
stats.Add(node)
addBlobs(blobs, node)