Skip to content

Commit

Permalink
Fixing bug getting commit message for revision being amended.
Browse files Browse the repository at this point in the history
Allowing commit to be reworded without changing files.
  • Loading branch information
SiameseCat authored and ananthakumaran committed Mar 16, 2016
1 parent d2129c3 commit dd22fbd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions monky.el
Expand Up @@ -2894,14 +2894,12 @@ With a non numeric prefix ARG, show all entries"
"Amends previous commit.
Brings up a buffer to allow editing of commit message."
(interactive)
(if (not (or monky-staged-files (monky-merge-p)))
(error "Nothing staged")
;; get last commit message
(with-current-buffer (get-buffer-create monky-log-edit-buffer-name)
(monky-hg-insert
(list "log"
"--template" "{desc}" "-r" "-1")))
(monky-pop-to-log-edit 'amend)))
;; get last commit message
(with-current-buffer (get-buffer-create monky-log-edit-buffer-name)
(monky-hg-insert
(list "log"
"--template" "{desc}" "-r" ".")))
(monky-pop-to-log-edit 'amend))

(provide 'monky)

Expand Down

0 comments on commit dd22fbd

Please sign in to comment.