[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit be12ac7511 3/7: magit-stage-file: With a prefix
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit be12ac7511 3/7: magit-stage-file: With a prefix argument offer ignored files |
Date: |
Sat, 20 May 2023 18:01:02 -0400 (EDT) |
branch: elpa/git-commit
commit be12ac751153615b848a15a47ec9f4e95144fe9c
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-stage-file: With a prefix argument offer ignored files
---
lisp/magit-apply.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 744dfec7a3..77cab39b9f 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -299,15 +299,19 @@ at point, stage the file but not its content."
;;;###autoload
(defun magit-stage-file (files)
- "Read one or more files and stage all changes in those files."
+ "Read one or more files and stage all changes in those files.
+With a prefix argument offer ignored files for completion."
(interactive
- (let* ((choices (nconc (magit-unstaged-files)
- (magit-untracked-files)))
+ (let* ((choices (if current-prefix-arg
+ (magit-ignored-files)
+ (nconc (magit-unstaged-files)
+ (magit-untracked-files))))
(default (or (magit-section-value-if 'file)
(magit-file-relative-name)))
(default (car (member default choices))))
- (list (magit-completing-read-multiple "Stage file,s" choices
- nil t nil nil default))))
+ (list (magit-completing-read-multiple
+ (if current-prefix-arg "Stage ignored file,s: " "Stage file,s: ")
+ choices nil t nil nil default))))
(magit-with-toplevel
;; For backward compatibility, and because of
;; the function's name, don't require a list.
- [nongnu] elpa/git-commit updated (33d1e41d69 -> ebd7a0635d), ELPA Syncer, 2023/05/20
- [nongnu] elpa/git-commit be12ac7511 3/7: magit-stage-file: With a prefix argument offer ignored files,
ELPA Syncer <=
- [nongnu] elpa/git-commit 09f600fdcd 1/7: magit-{un, }stage-file: Always prompt, ELPA Syncer, 2023/05/20
- [nongnu] elpa/git-commit df8095b4da 2/7: magit-{un, }stage-file: Support acting on multiple files, ELPA Syncer, 2023/05/20
- [nongnu] elpa/git-commit 9c6207bb84 4/7: magit-file-dispatch: No longer pivot if not visiting file, ELPA Syncer, 2023/05/20
- [nongnu] elpa/git-commit a4a007f51b 6/7: magit-file-tracked-p: Separate file arguments from other arguments, ELPA Syncer, 2023/05/20
- [nongnu] elpa/git-commit ebd7a0635d 7/7: magit-{un, }stage-buffer-file: New commands, ELPA Syncer, 2023/05/20
- [nongnu] elpa/git-commit 98a1f1d74b 5/7: magit-file-ignored-p: New function, ELPA Syncer, 2023/05/20