summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2022-12-26 18:04:22 -0500
committerKyle Meyer <kyle@kyleam.com>2024-01-22 00:02:53 -0500
commitde83751ba7df571e181a7c1ecc3cc75e9fcc8683 (patch)
tree08469411bbe4dc0318ef38ae533c7a18bb4fbae3 /lisp
parentf7bb5a314ac235641f9a6548850c3592da4af7ed (diff)
downloademacs.d-de83751ba7df571e181a7c1ecc3cc75e9fcc8683.tar.gz
km/magit-update-or-auto-commit: Strip directory by default
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-magit.el8
1 files 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")))))