aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-08-22Idea for adding diff coloursdiff-coloursTeddy Wing
Ideas for getting diff colours from the Git config and parsing them using 'colorparse'. Leaving this aside and planning to add diff colours by executing `git-diff` instead. Shelling out to `git diff` would allow us to accept diff command line options like `--word-diff` and have them work transparently.
2020-08-06Increase version v0.0.1 -> v0.1.0v0.1.0Teddy Wing
2020-08-06Remove `github-suggestion/Cargo.lock`Teddy Wing
This is subsumed into `Cargo.lock` and doesn't do anything any more.
2020-08-06TODO: Explain `git-sugcommit`Teddy Wing
Probably not going to do this one as it's not always possible to get the commenter's name and email address, and even then it might not be the same as what they use in the repo.
2020-08-06Makefile: Package `dist/` into a bundled archive for releaseTeddy Wing
2020-08-06Makefile: Remove unused list of productsTeddy Wing
This was replaced by `RELEASE_PRODUCTS` so that I could make `DIST_PRODUCTS` based on `PRODUCTS`.
2020-08-06Makefile: Put distribution binaries in `dist/bin/`Teddy Wing
2020-08-06Makefile: Put distribution man pages in `dist/share/man/man1/`Teddy Wing
2020-08-06Makefile: Copy release products to `dist/`Teddy Wing
Add recipes to build release targets and copy the binaries and man pages into the `dist/` folder. We'll use this to package a release archive.
2020-08-06README: Update install/uninstall commandsTeddy Wing
Got an error: error: failed to open: /usr/local/.crates.toml when I tried the command with the `--root /usr/local` argument, so decided to remove it. Need to use the root crate name in the `cargo uninstall` command.
2020-08-06Rename the project `git-suggestion`Teddy Wing
Since this is a Git command, this makes more sense to me.
2020-08-05Add READMETeddy Wing
Found a suggestion on the `gh` GitHub CLI project page from 'mislav' (https://github.com/mislav) and 'probablycorey' (https://github.com/probablycorey) to use as an example. Haven't tested the install/uninstall instructions yet (copied these from another one of my projects).
2020-08-05OwnerRepo: Remove ".git" suffix from HTTPS URLsTeddy Wing
I hadn't tested with HTTPS remote URLs, so assumed the code I copied from `github_suggestion::url` would work. It worked for suggestion comment URLs, but it doesn't work for remote URLs because the latter end in ".git". Remove this suffix to fix the bug.
2020-08-05client::Error::Deserialize: Include source error messageTeddy Wing
Forgot to include this so we didn't get extra information about the cause of the error.
2020-08-04Add license (GNU GPLv3+)Teddy Wing
2020-08-04Update TODOTeddy Wing
2020-08-04Add man page for `git-sugapply`Teddy Wing
Copied from `git-sugpatch.1`, since the general elements are basically the same. Modified to describe the specifics of the `git-sugapply` command.
2020-08-04doc/git-sugpatch.1: Add values to command line optionsTeddy Wing
Make it clear that these options require argument values.
2020-08-04doc/git-sugpatch.1: Use the same ID in the URL and ID examplesTeddy Wing
To make it clear which ID needs to be used when using the short form.
2020-08-04doc/git-sugpatch.1: Clarify precedence of configuration optionsTeddy Wing
2020-08-04Add man page for `git-sugpatch`Teddy Wing
2020-08-03Update TODOTeddy Wing
2020-08-03Config: Add a version argumentTeddy Wing
Allow getting the program version from the command line.
2020-08-02Update TODOTeddy Wing
2020-08-02Remove `main.rs`Teddy Wing
We have multiple binaries in `src/bin/`, so this file is no longer needed.
2020-08-02Add documentation commentsTeddy Wing
Light documentation for our various functions and types.
2020-08-02Update TODOTeddy Wing
2020-08-02Update TODOTeddy Wing
2020-08-02Move suggestion arguments check to `Config::get`Teddy Wing
Since this check for suggestion arguments is in both binaries, we can move it to the common preflight function. Clean up other areas now that we moved the function.
2020-08-02git-sugapply: Copy over new logic from `git-sugpatch`Teddy Wing
Use the new logic from `git-sugpatch` to build a `Config` and run `apply()` on all suggestion input arguments.
2020-08-02Config: Add description to `--github-token` argumentTeddy Wing
2020-08-02Config: Add description to `--remote` argumentTeddy Wing
2020-08-02Add `-h` argumentTeddy Wing
Print usage on `-h` and `--help`. Store the usage brief on `Config` in order to be able to print it from multiple places.
2020-08-02git-sugpatch: Print usage with no suggestion argumenetTeddy Wing
Add `Options` to `Config` to allow us to get a usage string from a `Config` instance, which is where we create `Options`. Needed to remove the `Debug` derive on `Config` in order to add the field as `Options` doesn't implement `Debug`.
2020-08-02Config: Remove old lineTeddy Wing
This was a test, before I worked out the API for this function.
2020-08-02Update TODOTeddy Wing
2020-08-02git-sugpatch: Exit with `EX_USAGE` if no suggestion argumentsTeddy Wing
Replace my test exit code with a real one.
2020-08-02Update TODOTeddy Wing
2020-08-02git-sugpatch: Replace `unwrap` with printed error message and exitTeddy Wing
2020-08-02for_suggestion: Replace `unwrap`s with exitsTeddy Wing
Print the error and exit.
2020-08-02lib.rs: Make `owner_repo` module privateTeddy Wing
Turns out this didn't need to be public at all.
2020-08-02git-sugpatch: Move the suggestion arguments loop to a new functionTeddy Wing
Split this out into a separate function because I want to reuse it in `git-sugapply`.
2020-08-02git-sugpatch: Fix `SuggestionUrl` parsingTeddy Wing
Forgot to change this line when I set up the loop over suggestion arguments. We want to parse the current argument instead of hard-coding the first one.
2020-08-02Update TODOTeddy Wing
2020-08-02lib.rs: Make `owner_repo` `pub(crate)` againTeddy Wing
Made this `pub` for one of the test tries in 38a871f28bad90e238021d8cc46b9fa926f9df75, but in the end it wasn't necessary. Restore this to the prior visibility.
2020-08-02config::Error::EnvVar: Include the variable name in the error messageTeddy Wing
The source error's message doesn't include the name. Ensure we print the name of the variable we're trying to get so that users know which one is missing.
2020-08-02config::Error::Opts: Include source error in messageTeddy Wing
Ensure the source error is surfaced.
2020-08-02git-sugpatch: Clean up after 38a871f28bad90e238021d8cc46b9fa926f9df75Teddy Wing
Remove unused code.
2020-08-02git-sugpatch: Error if no remote and suggestion ID argumentTeddy Wing
We want to allow not having a remote when URL arguments are given, but require it when a suggestion ID argument is given (otherwise we wouldn't have an owner-repo pair to make the GitHub request). Had some trouble with the `OwnerRepo.o_r` value. It was being moved into the closure, so tried a loop. There was a similar problem with the loop. However, by returning, I was able to get a reference to the `Result` instead of having it be moved.
2020-08-02git-sugpatch: Print error and exit on `Config::get` errorTeddy Wing
Add `exitcode` to exit with an appropriate code. Add the `gseprintln` macro to wrap `eprintln!()`, prefixing the output with "error: ".