mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 04:20:57 +01:00
added 'tvd-stage-and-commit-current-buffer
So now I can enter C-c g ('magit-file-dispatch) and from there press C
which causes the current buffer to be staged and a commit be
created in one run.
This commit is contained in:
@@ -85,6 +85,16 @@
|
|||||||
(transient-append-suffix 'magit-log "l"
|
(transient-append-suffix 'magit-log "l"
|
||||||
'("s" "dired" magit-dired-jump))
|
'("s" "dired" magit-dired-jump))
|
||||||
|
|
||||||
|
;; for a one file commit just do the stage+commit in 1 step just as
|
||||||
|
;; with git commit -am
|
||||||
|
(defun tvd-stage-and-commit-current-buffer()
|
||||||
|
(interactive)
|
||||||
|
(magit-stage buffer-file-name)
|
||||||
|
(magit-commit-create))
|
||||||
|
|
||||||
|
(transient-append-suffix 'magit-file-dispatch "s"
|
||||||
|
'("C" "Stage+Commit" tvd-stage-and-commit-current-buffer))
|
||||||
|
|
||||||
;; after an exhausting discussion on magit#3139 I use this function
|
;; after an exhausting discussion on magit#3139 I use this function
|
||||||
;; to (kind of) switch to another repository from inside magit-status.
|
;; to (kind of) switch to another repository from inside magit-status.
|
||||||
(defun tvd-switch-magit-repo ()
|
(defun tvd-switch-magit-repo ()
|
||||||
|
|||||||
Reference in New Issue
Block a user