-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmajutsu-commit.el
More file actions
42 lines (30 loc) · 1.05 KB
/
majutsu-commit.el
File metadata and controls
42 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
;;; majutsu-commit.el --- Commit and describe commands for Majutsu -*- lexical-binding: t; -*-
;; Copyright (C) 2025-2026 0WD0
;; Author: 0WD0 <[email protected]>
;; Maintainer: 0WD0 <[email protected]>
;; Keywords: tools, vc
;; URL: https://github.com/0WD0/majutsu
;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Commentary:
;; This library implements jj commit and describe frontends.
;;; Code:
(require 'majutsu)
;;; majutsu-commit
;;;###autoload
(defun majutsu-commit ()
"Create a commit using Emacs as the editor."
(interactive)
(majutsu-run-jj-with-editor '("commit")))
;;; majutsu-describe
;;;###autoload
(defun majutsu-describe (&optional arg)
"Update the description for the commit at point.
With prefix ARG, add --ignore-immutable."
(interactive "P")
(let* ((revset (or (magit-section-value-if 'jj-commit) "@"))
(args (append (list "describe" "-r" revset)
(when arg '("--ignore-immutable")))))
(majutsu-run-jj-with-editor args)))
;;; _
(provide 'majutsu-commit)
;;; majutsu-commit.el ends here