mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 06:07:44 +00:00
Fix diff
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:
parent
a08b95c497
commit
206550a246
7
changelog/unreleased/issue-3685
Normal file
7
changelog/unreleased/issue-3685
Normal file
@ -0,0 +1,7 @@
|
||||
Bugfix: Fix the diff command
|
||||
|
||||
There was a bug in the `diff` command, it would always show files in a removed
|
||||
directory as added. We've fixed that.
|
||||
|
||||
https://github.com/restic/restic/issues/3685
|
||||
https://github.com/restic/restic/pull/3686
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user