code: func ChangesSize(newDir string, changes []Change) int64 {
  	var (
  		size int64
  		sf   = make(map[uint64]struct{})
  	)
  	for _, change := range changes {
  		if change.Kind == ChangeModify || change.Kind == ChangeAdd {
  			file := filepath.Join(newDir, change.Path)
  			fileInfo, err := os.Lstat(file)
  			if err != nil {
  				logrus.Errorf("Can not stat %q: %s", file, err)
  				continue
  			}
  
  			if fileInfo != nil && !fileInfo.IsDir() {
  				if hasHardlinks(fileInfo) {
  					inode := getIno(fileInfo)
  					if _, ok := sf[inode]; !ok {
  						size += fileInfo.Size()
  						sf[inode] = struct{}{}
  					}
  				} else {
  					size += fileInfo.Size()
  				}
  			}
  		}
  	}
  	return size
  }
docs: // ChangesSize calculates the size in bytes of the provided changes, based on newDir.