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

need easy way to review staged commits while committing #946

Closed
aspiers opened this issue Sep 26, 2013 · 14 comments
Closed

need easy way to review staged commits while committing #946

aspiers opened this issue Sep 26, 2013 · 14 comments
Labels
enhancement New feature or request
Milestone

Comments

@aspiers
Copy link
Contributor

aspiers commented Sep 26, 2013

After entering git-commit-mode via c c, there needs to be an easy way to view the staged commit's diffs in another buffer, so the diffs can be referred to whilst writing the log message. I'm assuming this requires integration with magit, which is why I didn't file it against the git-modes repo.

@tarsius
Copy link
Member

tarsius commented Sep 26, 2013

There's an option for that: magit-expand-staged-on-commit. I haven't enabled that be default (yet?) because it would be slow when the diffs are huge.

@tarsius tarsius closed this as completed Sep 26, 2013
@aspiers
Copy link
Contributor Author

aspiers commented Sep 26, 2013

Sorry I wasn't clearer, but please re-open, because magit-expand-staged-on-commit isn't quite the functionality I was requesting. Your second sentence is a perfect example of why magit-expand-staged-on-commit isn't sufficient - sometimes the diffs are small, and sometimes they are huge. So the choice whether to view them should not be global, it should be per-commit. I don't want to see the diffs every time I commit - only when I press a key sequence from the commit buffer.

@tarsius
Copy link
Member

tarsius commented Sep 26, 2013

Ah I see.

@tarsius tarsius reopened this Sep 26, 2013
@tarsius
Copy link
Member

tarsius commented Oct 20, 2013

I have just made the old commit mode available as a separate package. Until the new commit mode is functioning in all its glory, you might or might not want to use that.

The repository is a https://github.com/magit/magit-log-edit. It should also appear on Melpa soon.

@tarsius
Copy link
Member

tarsius commented Oct 26, 2013

I have added magit-diff-staged and in git-commit-mode-map bound C-c C-d to that.

@tarsius tarsius closed this as completed Oct 26, 2013
@aspiers
Copy link
Contributor Author

aspiers commented Oct 26, 2013

Awesome thanks, I'll give it a try!

@tarsius
Copy link
Member

tarsius commented Oct 26, 2013

I changed the binding to C-c C-d for consistency (but am considering making that and all pseudo header things available on C-c LETTER too).

@tarsius
Copy link
Member

tarsius commented Oct 26, 2013

You are welcome.

@npostavs
Copy link
Contributor

but am considering making that and all pseudo header things available on C-c LETTER too)

But isn't that supposed to be reserved for user bindings...

@tarsius
Copy link
Member

tarsius commented Oct 26, 2013

I have some vague memory of that but though it was all of C-c and since we are violating that anyway, and every one else does it too... Are you sure that it is only C-c LETTER?

@dudebout
Copy link
Contributor

It is only C-c LETTER and we do not violate it usually.

@tarsius
Copy link
Member

tarsius commented Oct 26, 2013

Ah then. Well it's fixed already :-)

@npostavs
Copy link
Contributor

C-c C-LETTER is for major mode
C-c LETTER is for user
See https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html

But there are quite a few packages that use C-c LETTER anyway.

@aspiers
Copy link
Contributor Author

aspiers commented Oct 26, 2013

But there are quite a few packages that use C-c LETTER anyway.

That doesn't make it ok for magit to do so :-)

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