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

Add changelog item to ”COMMIT_EDITMSG” buffer #1130

Closed
baby-gnu opened this issue Dec 30, 2013 · 2 comments
Closed

Add changelog item to ”COMMIT_EDITMSG” buffer #1130

baby-gnu opened this issue Dec 30, 2013 · 2 comments
Labels
invalid This doesn't seem right
Milestone

Comments

@baby-gnu
Copy link

Hello,

I recently switch from DVC to magit since I exclusively use git now.

I install magit from MELPA and wonder if some of my DVC workflow could be done with magit:

  1. Edit files
  2. Review modification before commit (I divert some vc command)
  3. Stage changes
  4. Run the commit to fill the log
  5. Type subject and basic explanation of “why the commit”
  6. Add per file summary of changes

Today, I'm doing points 1 to 5 with magit by diverting some vc command to use their prefix keys (without disturbing other backend).

The point 6 is the one I'm looking for, with DVC, when on a hunk, I hit C-x 4 a and it insert to the “COMMIT_EDITMSG” buffer the following line

* path/to/file (function name): <POINT>

with point position denoted by the <POINT> place holder.

@baby-gnu
Copy link
Author

Looking at add-change-log-entry, I think it could be split in several pieces to be more useful to others.

@baby-gnu
Copy link
Author

I should have read more carefully the code of magit, I found the magit-commit-add-log which does the job.

I just need to bind a keymap for it:

;; Insert commit log entry
(define-key magit-mode-map (kbd "M-l") 'magit-commit-add-log)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Development

No branches or pull requests

1 participant