The first two commits remove Wishlist.md (replaced with issues linked in the commit description) and doc.go (I think it's just unused?). The third commit fixes #13 by creating leading parent directories returning an empty result if the file doesn't exist, and the fourth improves error reporting when trying to read the file.
Manual testing confirmed that the missing file doesn't trigger an error (and that it's still successfully created by CreateRepository()). I was also able to trigger an intentional failure of ReadFileLines() (by creating ~/git-bundle-server with sudo mkdir -m 700 ~/git-bundle-server) and confirmed that the permission denied error was reported:
$ git-bundle-server init git@github.com:rust-lang/rust.git rust-lang/rust
2023/02/16 13:55:02 Failed with error: failed to parse routes file: open /Users/vdye/git-bundle-server//routes: permission denied
Closes #13.
The first two commits remove
Wishlist.md
(replaced with issues linked in the commit description) anddoc.go
(I think it's just unused?). The third commit fixes #13 bycreating leading parent directoriesreturning an empty result if the file doesn't exist, and the fourth improves error reporting when trying to read the file.Manual testing confirmed that the missing file doesn't trigger an error (and that it's still successfully created by
CreateRepository()
). I was also able to trigger an intentional failure ofReadFileLines()
(by creating~/git-bundle-server
withsudo mkdir -m 700 ~/git-bundle-server
) and confirmed that the permission denied error was reported: