magit/magit — pull request #1004 by npostavs (2013-10-19 03:16:55+00:00)
Title: Option to elide stage all confirmation when safe to do so.

As mentioned in [#970](https://github.com/magit/magit/pull/970#issuecomment-25470864) `stage-all` can result in loss of work. However, a lot of the time (when nothing is staged yet) it is easily undoable with `unstage-all`.

I added a `safe` option which only asks for confirmation when there is already something staged (or unstaged|untracked for unstaging). I also added a `looks-safe` option that saves the git calls by only checking the status buffer (this should be pretty safe if you avoid doing index manipulation outside magit).