Skip to content

Commit

Permalink
chore: add debug line to RedoHasher (#2591)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-prindle authored Jun 28, 2023
1 parent 2f946a4 commit a6bd60e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ func RedoHasher() func(string) (string, error) {
if err != nil {
return "", err
}

logrus.Debugf("Hash components for file: %s, mode: %s, mtime: %s, size: %s, user-id: %s, group-id: %s",
p, []byte(fi.Mode().String()), []byte(fi.ModTime().String()),
[]byte(strconv.FormatInt(fi.Size(), 16)), []byte(strconv.FormatUint(uint64(fi.Sys().(*syscall.Stat_t).Uid), 36)),
[]byte(strconv.FormatUint(uint64(fi.Sys().(*syscall.Stat_t).Gid), 36)))

h.Write([]byte(fi.Mode().String()))
h.Write([]byte(fi.ModTime().String()))
h.Write([]byte(strconv.FormatInt(fi.Size(), 16)))
Expand Down

0 comments on commit a6bd60e

Please sign in to comment.