Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add a verbose (show diff) option to describe/commit/split #4087

Closed
jalil-salame opened this issue Jul 14, 2024 · 2 comments
Closed

FR: Add a verbose (show diff) option to describe/commit/split #4087

jalil-salame opened this issue Jul 14, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jalil-salame
Copy link

Is your feature request related to a problem? Please describe.
I like reviewing the diffs when describing a change to catch mistakes (e.g. wrong split order, or including debug statements).

Describe the solution you'd like
Add a verbose CLI option (in the spirit of git commit --verbose) that adds a commented out diff to the default commit message body.

Describe alternatives you've considered
I can't think of any alternatives to this behavior, but feel free to add some.

Additional context
man git-config:

       -v, --verbose

           Show unified diff between the HEAD commit and what would be committed at the bottom of the commit message template to help the user describe the commit by reminding what changes the commit
           has. Note that this diff output doesn’t have its lines prefixed with #. This diff will not be a part of the commit message. See the commit.verbose configuration variable in git-config(1).

           If specified twice, show in addition the unified diff between what would be committed and the worktree files, i.e. the unstaged changes to tracked files.
@ilyagr ilyagr added enhancement New feature or request good first issue Good for newcomers labels Jul 14, 2024
@ilyagr
Copy link
Contributor

ilyagr commented Jul 14, 2024

This seems like a good idea to me.

The one thing I would change is the option name. I think --verbose now generally tends to mean having a CLI tool show detailed output, like our --debug (which was previously called --verbose, but we might want to use --verbose again sometime, who knows).

One option for a name is --patch or --show-patch. Perhaps we can come up with something better.

This also might be a duplicate, I think I remember a similar discussion before, but I'm not sure whether it was in an issue or on Discord.

@yuja
Copy link
Contributor

yuja commented Jul 15, 2024

Closing as duplicate of #1946, and #3470 has some attempt.

@yuja yuja closed this as completed Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants