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

commit.verbose support in commit message editor #29

Open
mmlb opened this issue Aug 15, 2019 · 4 comments
Open

commit.verbose support in commit message editor #29

mmlb opened this issue Aug 15, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@mmlb
Copy link

mmlb commented Aug 15, 2019

Both git commit and during a reword during rebase show the staged patch within the editor. I find it very useful context to have while crafting the message, it would be great for git-revisebto do the same.

@mystor
Copy link
Owner

mystor commented Aug 16, 2019

Currently the editor only shows the output of git diff-tree --stat A B in the extra text information. Theoretically it would be possible to add extra information though.

What info in particular from git commit would you want to add?

@mystor mystor added the enhancement New feature or request label Aug 16, 2019
@mmlb
Copy link
Author

mmlb commented Aug 17, 2019

I'm sorry I forgot that I've got commit.verbose=true configured, this shows me the changes to be committed as a patch embedded in the message. Here's output of git commit --amend (implicit --verbose) of current master:

❯ cat .git/COMMIT_EDITMSG
Remove unused import

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author:    Nika Layzell <[email protected]>
# Date:      Fri Aug 16 00:08:52 2019 -0700
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
#	modified:   gitrevise/utils.py
#
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
diff --git a/gitrevise/utils.py b/gitrevise/utils.py
index f891356..9698dc5 100644
--- a/gitrevise/utils.py
+++ b/gitrevise/utils.py
@@ -1,5 +1,5 @@
 from typing import List, Optional, Tuple
-from subprocess import run, CalledProcessError, PIPE
+from subprocess import run, CalledProcessError
 from pathlib import Path
 import textwrap

It would be great if git-revise would read the commit.verbose setting and follow suit.

@mystor mystor changed the title git-revise -e should display patch in commit message editor commit.verbose support in commit message editor Aug 19, 2019
@solson
Copy link

solson commented Apr 26, 2021

I will try implementing this soon. This is the relevant logic in git for what to print when commit.verbose = true.

nikitabobko added a commit to nikitabobko/git-revise that referenced this issue Jul 2, 2022
See `--verbose` in `man git commit`.

Fix mystor#29

Co-authored-by: ruro <[email protected]>
nikitabobko added a commit to nikitabobko/git-revise that referenced this issue Jul 3, 2022
See `--verbose` in `man git commit`.

Fix mystor#29

Co-authored-by: ruro <[email protected]>
nikitabobko added a commit to nikitabobko/git-revise that referenced this issue Jul 3, 2022
See `--verbose` in `man git commit`.

Fix mystor#29

Co-authored-by: ruro <[email protected]>
nikitabobko added a commit to nikitabobko/git-revise that referenced this issue Jul 3, 2022
See `--verbose` in `man git commit`.

Fix mystor#29

Co-authored-by: ruro <[email protected]>
nikitabobko added a commit to nikitabobko/git-revise that referenced this issue Aug 26, 2022
See `--verbose` in `man git commit`.

Fix mystor#29

Co-authored-by: ruro <[email protected]>
nikitabobko added a commit to nikitabobko/git-revise that referenced this issue Jan 11, 2023
See `--verbose` in `man git commit`.

Fix mystor#29

Co-authored-by: ruro <[email protected]>
@nikitabobko
Copy link

Fixed in #126 Would be nice if someone could review it and merge 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants