chore: rename project to majjit

This commit is contained in:
2026-02-24 13:07:35 +01:00
parent 99a419c6bb
commit 9b566ec98e
3 changed files with 40 additions and 40 deletions

View File

@@ -208,7 +208,7 @@ If you develop a new program, and you want it to be of the greatest possible use
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
magit-clone-jj majjit
Copyright (C) 2026 phundrak Copyright (C) 2026 phundrak
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
@@ -221,7 +221,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
magit-clone-jj Copyright (C) 2026 phundrak majjit Copyright (C) 2026 phundrak
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.

View File

@@ -1,3 +1,3 @@
# magit-clone-jj # majjit
Simple package to clone repositories in Emacs using Magit and Jujutsu. Simple package to clone repositories in Emacs using Magit and Jujutsu.

View File

@@ -1,10 +1,10 @@
;;; magit-clone-jj.el --- Clone jujutsu repositories with Magit's interface -*- lexical-binding: t -*- ;;; majjit.el --- Clone jujutsu repositories with Magit's interface -*- lexical-binding: t -*-
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com> ;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com> ;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
;; Version: 0.1.0 ;; Version: 0.1.0
;; Package-Requires: ((emacs "28.1") (magit "4.5.0")) ;; Package-Requires: ((emacs "28.1") (magit "4.5.0"))
;; Homepage: https://labs.phundrak.com/phundrak/magit-clone-jj ;; Homepage: https://labs.phundrak.com/phundrak/majjit
;; Keywords: git tools vcs ;; Keywords: git tools vcs
@@ -32,41 +32,41 @@
(require 'magit) (require 'magit)
(defgroup magit-clone-jj nil (defgroup majjit nil
"Clone your jj repositories with Magit." "Clone your jj repositories with Magit."
:group 'tools :group 'tools
:prefix "magit-clone-jj-" :prefix "majjit-"
:link '(url-link :tag "https://labs.phundrak.com/phundrak/magit-clone-jj")) :link '(url-link :tag "https://labs.phundrak.com/phundrak/majjit"))
(defcustom magit-clone-jj-default-directory nil (defcustom majjit-default-directory nil
"See `magit-clone-default-directory'." "See `magit-clone-default-directory'."
:package-version '(magit-clone-jj . "0.1.0") :package-version '(majjit . "0.1.0")
:group 'magit-clone-jj :group 'majjit
:type '(choice (const :tag "Value of default-directory") :type '(choice (const :tag "Value of default-directory")
(directory :tag "Constant directory") (directory :tag "Constant directory")
(function :tag "Function's value"))) (function :tag "Function's value")))
(defcustom magit-clone-jj-executable "jj" (defcustom majjit-executable "jj"
"Local executable of jj." "Local executable of jj."
:package-version '(magit-clone-jj . "0.1.0") :package-version '(majjit . "0.1.0")
:group 'magit-clone-jj :group 'majjit
:type 'path) :type 'path)
(defcustom magit-clone-jj-remote-executable "jj" (defcustom majjit-remote-executable "jj"
"Remote executable of jj." "Remote executable of jj."
:package-version '(magit-clone-jj . "0.1.0") :package-version '(majjit . "0.1.0")
:group 'magit-clone-jj :group 'majjit
:type 'path) :type 'path)
(defcustom magit-clone-jj-global-arguments (defcustom majjit-global-arguments
'("--color=never") '("--color=never")
"Global jj arguments." "Global jj arguments."
:package-version '(magit-clone-jj . "0.1.0") :package-version '(majjit . "0.1.0")
:group 'magit-clone-jj :group 'majjit
:type '(repeat string)) :type '(repeat string))
(defun magit-clone-jj-sentinel (process event) (defun majjit-sentinel (process event)
"Default sentinel used by `magit-clone-jj-run-jj-async'." "Default sentinel used by `majjit-run-jj-async'."
(when (memq (process-status process) '(exit signal)) (when (memq (process-status process) '(exit signal))
(setq event (substring event 0 -1)) (setq event (substring event 0 -1))
(when (string-match "^finished" event) (when (string-match "^finished" event)
@@ -74,15 +74,15 @@
(when (eq process magit-this-process) (when (eq process magit-this-process)
(setq magit-this-process nil)))) (setq magit-this-process nil))))
(defun magit-clone-jj-executable () (defun majjit-executable ()
"Return executable for jj. "Return executable for jj.
See `magit-git-executable'." See `magit-git-executable'."
(if (file-remote-p default-directory) (if (file-remote-p default-directory)
magit-clone-jj-remote-executable majjit-remote-executable
magit-clone-jj-executable)) majjit-executable))
(defun magit-clone-jj-run-jj-async (directory &rest args) (defun majjit-run-jj-async (directory &rest args)
"Start jujutsu and return the process object. "Start jujutsu and return the process object.
ARGS is flattened and then used as arguments to jujutsu. Once cloning is ARGS is flattened and then used as arguments to jujutsu. Once cloning is
@@ -90,27 +90,27 @@ done, open DIRECTORY with `find-file'.
Inspired by `magit-start-git'." Inspired by `magit-start-git'."
(let ((default-process-coding-system (magit--process-coding-system)) (let ((default-process-coding-system (magit--process-coding-system))
(magit-git-global-arguments magit-clone-jj-global-arguments)) (magit-git-global-arguments majjit-global-arguments))
(apply #'magit-start-process (apply #'magit-start-process
(magit-clone-jj-executable) (majjit-executable)
nil nil
(magit-process-git-arguments args)) (magit-process-git-arguments args))
;; Don't refresh the buffer we're calling from. ;; Don't refresh the buffer we're calling from.
(process-put magit-this-process 'inhibit-refresh t) (process-put magit-this-process 'inhibit-refresh t)
(set-process-sentinel magit-this-process (set-process-sentinel magit-this-process
(lambda (process event) (lambda (process event)
(magit-clone-jj-sentinel process event) (majjit-sentinel process event)
(find-file directory))))) (find-file directory)))))
(defun magit-clone-jj-read-args () (defun majjit-read-args ()
"Get all the necessary args for cloning the repository." "Get all the necessary args for cloning the repository."
(let* ((magit-clone-default-directory magit-clone-jj-default-directory) (let* ((magit-clone-default-directory majjit-default-directory)
(magit-args (magit-clone-read-args))) (magit-args (magit-clone-read-args)))
(list (car magit-args) (list (car magit-args)
(cadr magit-args) (cadr magit-args)
(yes-or-no-p "Colocate the repository? ")))) (yes-or-no-p "Colocate the repository? "))))
(defun magit-clone-jj--check-valid-clone-directory (repository directory) (defun majjit--check-valid-clone-directory (repository directory)
"Check whether the target DIRECTORY is a valid target. "Check whether the target DIRECTORY is a valid target.
Taken from `magit-clone-internal'. Refer to it for use of REPOSITORY and Taken from `magit-clone-internal'. Refer to it for use of REPOSITORY and
@@ -127,13 +127,13 @@ DIRECTORY."
(user-error "%s already exists" directory)))) (user-error "%s already exists" directory))))
(user-error "%s already exists and is not a directory" directory))))) (user-error "%s already exists and is not a directory" directory)))))
(defun magit-clone-jj--internal (repository directory colocate-p) (defun majjit--internal (repository directory colocate-p)
"Clone REPOSITORY to DIRECTORY using jj. "Clone REPOSITORY to DIRECTORY using jj.
If COLOCATE-P is t, colocate the repository with git." If COLOCATE-P is t, colocate the repository with git."
(let ((directory (file-name-as-directory (expand-file-name directory)))) (let ((directory (file-name-as-directory (expand-file-name directory))))
(magit-clone-jj--check-valid-clone-directory repository directory) (majjit--check-valid-clone-directory repository directory)
(magit-clone-jj-run-jj-async directory (majjit-run-jj-async directory
"git" "git"
"clone" "clone"
(if colocate-p "--colocate" nil) (if colocate-p "--colocate" nil)
@@ -142,15 +142,15 @@ If COLOCATE-P is t, colocate the repository with git."
(magit-convert-filename-for-git directory)))) (magit-convert-filename-for-git directory))))
;;;###autoload ;;;###autoload
(defun magit-clone-jj (repository directory colocate-p) (defun majjit-clone (repository directory colocate-p)
"Clone a git REPOSITORY using jujutsu into a DIRECTORY. "Clone a git REPOSITORY using jujutsu into a DIRECTORY.
If COLOCATE-P is t, then colocate the repository with git. If COLOCATE-P is t, then colocate the repository with git.
Depends on Magit. Inspired by `magit-clone-regular'." Depends on Magit. Inspired by `magit-clone-regular'."
(interactive (magit-clone-jj-read-args)) (interactive (majjit-read-args))
(magit-clone-jj--internal repository directory colocate-p)) (majjit--internal repository directory colocate-p))
(provide 'magit-clone-jj) (provide 'majjit)
;;; magit-clone-jj.el ends here ;;; majjit.el ends here