aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-03-30 21:07:51 +0200
committerJonas Bernoulli <jonas@bernoul.li>2026-03-30 21:07:51 +0200
commitbbaa742cafda74367ec10aa773a8daf0e0c5c7f0 (patch)
treeb98e4b875360d733486cc8ddaaa8245ccbc685bf
parent40b524441f689642069a64fbf134a07737271c7e (diff)
magit-wip-commit-worktree: Tweak comments
-rw-r--r--lisp/magit-wip.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/magit-wip.el b/lisp/magit-wip.el
index d963b4c..8783159 100644
--- a/lisp/magit-wip.el
+++ b/lisp/magit-wip.el
@@ -187,16 +187,16 @@ commit message."
(defun magit-wip-commit-worktree (ref files msg)
(when (or (not files)
- ;; `update-index' will either ignore (before Git v2.32.0)
- ;; or fail when passed directories (relevant for the
- ;; untracked files code paths).
+ ;; "git update-index" either ignores (before Git v2.32.0) or
+ ;; fails, when passed directories. This is relevant for the
+ ;; untracked files code paths.
(setq files (seq-remove #'file-directory-p files)))
(let* ((wipref (magit--wip-wtree-ref ref))
(parent (magit-wip-get-parent ref wipref))
(tree (magit-with-temp-index parent (list "--reset" "-i")
(if files
- ;; Note: `update-index' is used instead of `add'
- ;; because `add' will fail if a file is already
+ ;; Use "git update-index" instead of "git add"
+ ;; because the latter fails if a file is already
;; deleted in the temporary index.
(magit-wip--git "update-index" "--add" "--remove"
"--ignore-skip-worktree-entries"