PR #83: vcs/util.go not delivered — GetAllFilesInPath and BuildLineToPositionMap missing #84
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was missed
Issue #78 required
vcs/util.goas part of this PR, containing two utility functions:GetAllFilesInPath(recursive directory traversal returningmap[string]string) andBuildLineToPositionMap(unified diff parser returning per-file new-line-to-diff-position maps). The exit criteria explicitly listed unit tests for both. The PR deliveredvcs/interfaces.goandvcs/types.gobut omittedvcs/util.goentirely.Source
vcs/util.go(not present)What needs to happen
vcs/util.gois created withGetAllFilesInPath(ctx context.Context, client FileReader, owner, repo, path string) (map[string]string, error)andBuildLineToPositionMap(diff string) map[string]map[int]intGetAllFilesInPath: empty dir, flat dir, nested dirs, mixedBuildLineToPositionMap: single hunk, multi-hunk, deletion lines not in map, multiple filesgo build ./...andgo test ./...passReferences