Skip to content

Commit

Permalink
legit: add commits logs help and Q
Browse files Browse the repository at this point in the history
  • Loading branch information
vindarel committed Jul 16, 2024
1 parent 39228d7 commit 0d9598a
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions extensions/legit/legit.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Currently Git-only. Concretely, this calls Git with the -w option.")
(define-key *legit-commits-log-keymap* "B" 'legit-commits-log-first-page)
(define-key *legit-commits-log-keymap* "q" 'legit-status) ;; could we save and re-display
;; the status buffer?
(define-key *legit-commits-log-keymap* "Q" 'legit-quit)
(define-key *legit-commits-log-keymap* "?" 'legit-logs-help)

;; rebase
;;; interactive
Expand Down Expand Up @@ -788,7 +790,7 @@ Currently Git-only. Concretely, this calls Git with the -w option.")
(format s "(b)ranches-> checkout another (b)ranch.~&")
(format s " -> (c)reate.~&")
(format s "(l)og-> (l) commits log~&")
(format s " -> (F) first commits~&")
(format s " -> (F) first page of the commits history~&")
(format s "(F)etch, pull-> (p) from remote branch~&")
(format s "(P)push -> (p) to remote branch~&")
(format s "(r)ebase -> (i)nteractively from commit at point, (a)bort~&")
Expand All @@ -798,5 +800,27 @@ Currently Git-only. Concretely, this calls Git with the -w option.")
(format s "Change windows: Tab, C-x o, M-o~&")
(format s "Quit: Escape, q, C-x 0.~&")
(format s "~%")
(format s "Show this help: C-x ? or ?, M-x legit-help")
(format s "Show this help: C-x ? or ?, M-x legit-help~&")
(format s "~%")
(format s "You can customize:~&")
(format s "~%")
(format s "lem/porcelain:*nb-latest-commits* which defaults to 10~&")
(format s "(and more)~&")
))

(define-command legit-logs-help () ()
"Help for the commits log view."
(with-pop-up-typeout-window (s (make-buffer "*legit-help*") :erase t)
(format s "In this commits log buffer, use:~&")
(format s "~%")
(format s "(f) forward page~&")
(format s "(b) backward one page~&")
(format s "(F) go to the last page of the commits history~&")
(format s "(B) come back to the first page of the commits history~&")
(format s "(q) come back to the legit status~&")
(format s "(Q) quit legit~&")
(format s "~%")
(format s "You can customize:~&")
(format s "~%")
(format s "lem/porcelain:*commits-log-page-size* which defaults to 200~&")
))

0 comments on commit 0d9598a

Please sign in to comment.