aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
AgeCommit message (Collapse)Author
2020-10-17write_since(): Output file paths relative to the current directoryTeddy Wing
Previously, the file paths of TODO lines in the output were relative to the repository root. When you're in a subdirectory, though, this makes them harder to work with, as they're relative paths, but aren't relative to the current working directory. Change the file path output so that paths are relative to the current directory instead of the repo root.
2020-10-08write_since(): Include TODO lines from untracked filesTeddy Wing
Previously, untracked files were not included in the diff, so TODO lines in those files would not be printed by the program. Add the untracked `DiffOptions` to include the content of these files when searching for TODOs.
2020-10-03Add license (GNU GPLv3+)Teddy Wing
2020-09-17lib.rs: Add doc commentsTeddy Wing
2020-09-16write_since(): Clean up `diff.foreach()` callbackTeddy Wing
* Remove commented code * Ignore unused `hunk` variable
2020-09-16write_since(): Handle errors in `diff.foreach()` callbackTeddy Wing
* Ignore lines that don't parse to UTF-8. Might want to figure out how to support other encodings. * Ignore lines that don't have a `path`. * Panic on write errors.
2020-09-16lib.rs: Replace top-level `unwrap()`s with `Result`sTeddy Wing
Add a new `Error` type that we can return in the failure case. Still need to work out how to handle errors inside the diff callback.
2020-09-16write_since(): Take an arbitrary branch as inputTeddy Wing
Allow the branch to be parameterised instead of forcing the base to be the local "master" branch. Added the `Todos` struct to store a `Repository` reference, since we need this for both the base ref and the diff. Decided to take a `Tree` instead of a `Branch` because we might want to compare against an arbitrary ref and allow users to specify that ref on the command line.
2020-09-16write_since(): Take an arbitrary `Write`rTeddy Wing
Instead of always printing to standard output, have the function take a writer to write the output to.
2020-09-16Move `main()` to `lib::write_since()`Teddy Wing
Move this to a library function for better organisation. This will facilitate splitting up and refining `write_since()`, and free up `main()` for command line argument parsing.