Add diff.compareEntry helper to compare attribute entries

- Use it to compare the entry attributes for all entry types.
  Allows comparing differences in file attributes among the
  contents of two directories. This is useful for verifying
  restored contents in end-to-end tests.

- Print message about modified entries only when both entries
  are files and they are being compared.
This commit is contained in:
Julio Lopez
2019-12-05 16:35:04 -08:00
committed by Jarek Kowalski
parent 5c58b306a4
commit d3f324f59b
2 changed files with 58 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ func runDiffCommand(ctx context.Context, rep *repo.Repository) error {
return errors.New("arguments do diff must both be directories or both non-directories")
}
d, err := diff.NewComparer(rep, os.Stdout)
d, err := diff.NewComparer(os.Stdout)
if err != nil {
return err
}