From de83751ba7df571e181a7c1ecc3cc75e9fcc8683 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 26 Dec 2022 18:04:22 -0500 Subject: km/magit-update-or-auto-commit: Strip directory by default --- lisp/km-magit.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/km-magit.el b/lisp/km-magit.el index fa4a208..08ddd06 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -50,7 +50,7 @@ a proper commit." (interactive) (magit-run-git "commit" "--all" "--message=auto")) -(defun km/magit-update-or-auto-commit (&optional no-directory) +(defun km/magit-update-or-auto-commit (&optional full-name) (interactive "P") (let ((files (delete-dups (nconc (magit-unstaged-files) (magit-staged-files))))) @@ -59,9 +59,9 @@ a proper commit." (1 (let ((file (car files))) (magit-run-git "commit" "--all" "--message" - (concat (funcall (if no-directory - #'file-name-nondirectory - #'identity) + (concat (funcall (if full-name + #'identity + #'file-name-nondirectory) file) (and (magit-rev-verify (concat "HEAD:" file)) ": Update"))))) -- cgit v1.2.3