diff --git a/NEWS b/NEWS index c51460b7..bc41b25c 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,11 @@ Changes in magit 0.8: * Hitting C-c C-s while editing a commit message will toggle the "--signoff" option. +* Hitting 's' on the "Untracked files" section title will stage all + untracked files. + +* Hitting 'C-u S' will stage all untracked and tracked files. + * Performance improvements in the status buffer. * Bug fixes to make Magit work better with newer Gits. @@ -51,9 +56,6 @@ Changes in magit 0.7: * Typing 'k' on the "Untracked files" section title will offer to delete all untracked files. -* Similarily, hitting 's' on the "Untracked files" section title will - stage all untracked files. - * Magit understands a bit of git-svn: the status buffer shows unpushed and unpulled commits, 'N r' runs git svn rebase, and 'N c' runs git svn dcommit. diff --git a/magit.el b/magit.el index fc3f90aa..5d368ce9 100644 --- a/magit.el +++ b/magit.el @@ -1983,9 +1983,11 @@ in log buffer." ((diff) (error "Can't unstage this diff")))) -(defun magit-stage-all () - (interactive) - (magit-run-git "add" "-u" ".")) +(defun magit-stage-all (&optional also-untracked-p) + (interactive "P") + (if also-untracked-p + (magit-run-git "add" ".") + (magit-run-git "add" "-u" "."))) (defun magit-unstage-all () (interactive) diff --git a/magit.texi b/magit.texi index b5c69d3f..89d712a6 100644 --- a/magit.texi +++ b/magit.texi @@ -204,6 +204,9 @@ You can add a untracked file to the staging area with @kbd{s}. If point is on the @emph{Untracked files} section title when you it @kbd{s}, all untracked files are staged. +Typing @kbd{C-u S} anywhere will also stage all untracked files, +together with all changes to the tracked files. + You can instruct Git to ignore them by typing @kbd{i}. This will add the filename to the @code{.gitignore} file. Typing @kbd{C-u i} will ask you for the name of the file to ignore. This is useful to ignore @@ -246,6 +249,9 @@ the changes, otherwise it is not.) To move all hunks of all diffs into the staging area in one go, type @kbd{S}. To unstage everything, type @kbd{U}. +Typing @kbd{C-u S} will stage all untracked files in addition to the +changes to tracked files. + You can discard uncommitted changes by moving point into a hunk and typing @kbd{k}. The changes to discard are selected as with @kbd{s} and @kbd{u}.