Add ability to inspect specific commits and diffs via command line arguments
- Dominant language
- Rust
- Stars
- 22.5k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
It should be easily possible to inspect the changes by a given git commit/patch or range of commits.
**Describe the solution you'd like**
There should be command line arguments to show the git commits.
*Examples:*
```shell
# inspect a specific git commit
gitui --commit COMMITHASH
# inspect a range of commits
gitui --commit REV1..REV2
# inspect a range of commits and skip the first one
gitui --commit REV1^..REV2
# inspect from a given commit to HEAD
gitui --commit REV1..HEAD
gitui --commit REV1..
# inspect a git patch file
gitui --inspect SOMEFILENAME.patch
```
**Describe alternatives you've considered**
There should be a method via the CLI UI for selecting a range of commits or a patch file for inspection.
**Additional context**
- See [Git Revision](https://git-scm.com/docs/gitrevisions) on how a range of git commits can be specified
- See [Git Diff and Patch](https://www.freecodecamp.org/news/git-diff-and-patch/) and [Git Format-Patch](https://git-scm.com/docs/git-format-patch) on details of git patch files
Contributor guide
Research direction
Start by locating gitui's command-line argument parsing and the existing commit or diff inspection entry points. Review how the examples using --commit and --inspect should map to Git revision ranges and patch files. Done means the requested arguments work for the listed commit, range, HEAD, and patch-file cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100