inFiles checks if the given file is in the list of files. The incoming filepaths in files should be cleaned before calling this function.
(files map[string]struct{}, v string)
| 438 | |
| 439 | // inFiles checks if the given file is in the list of files. The incoming filepaths in files should be cleaned before calling this function. |
| 440 | func inFiles(files map[string]struct{}, v string) bool { |
| 441 | v = filepath.Clean(v) |
| 442 | _, exists := files[v] |
| 443 | return exists |
| 444 | } |
| 445 | |
| 446 | func (w *Worktree) resetWorktree(t *object.Tree, files []string) error { |
| 447 | changes, err := w.diffStagingWithWorktree(true, false) |
no test coverage detected
searching dependent graphs…