This is different from regular stashing because there is no prompting for a
name, and the stash is immediately re-applied. It's just a way of taking a
quick snapshot of your working tree, so you can come back to later if need
be.
For example, if you had just made a lot of changes to your project, and then
needed to make another sweeping change before you could commit again, this
would let you safely store your changes without having to resort to a branch.
The usual behavior of committing all unstaged changes when there are
no staged changes makes it impossible to amend a commit just to fix
the commit message, which is a quite common thing to do.
* magit.el (magit-log-edit-commit): Do not pass "--all" to git commit
when amending.
* magit.el (magit-section-lineage, magit-section-show-level, magit-show-level,
magit-define-level-shower-1): New.
(magit-mode-map): Bind the digits and M-digits to magit-show-level-N
and magit-show-level-N-all.
* magit.texi: Document it in a new chapter for Sections.
* magit.el (magit-status): Only read the top directory with e prefix
argument or when we are not inside a Git repository.
* magit.texi, NEWS: Document the new behavior.
* magit.el (magit-show-stash): New.
(magit-visit-item): Use it and pop to the buffer for stashes.
(magit-show-item-or-scroll-up, magit-show-item-or-scroll-down): Handle
stashes.
* magit.el (magit-read-rev-range): Don't do anything special when
current-prefix-arg is set.
(magit-log): Use magit-read-rev-range instead of read-string.
(magit-log-long): Likewise.
On non-existent directiories magit-get-top-dir was failing returning
garbage string like "zsh: cd: no such file or directory: ...". Now it
returns nil in such cases.
Signed-off-by: John Wiegley <johnw@newartisans.com>
* magit.el (magit-insert-section): Revert earlier change: first
argument is used as the section title and the section type is usually
nil. When the first argument is a pair, it specvifies both the title
and the type.
* magit.el (magit-section-hidden-default): New.
(magit-new-section): Only expect type as argument, not a general list
of slots. Take 'hidden' value from magit-section-hidden-default.
(magit-with-section): Likewise.
(magit-wash-diff): Adapted.
* magit.el (magit-refresh-commit-buffer): Use nil as type for outer
section so that the highlight is not used for it.
(magit-refresh-log-buffer): Likewise.
* magit.el (magit-with-section): Check that args is a list before
accessing its car.
(magit-insert-section): Set the title of the section from the real
title, and the txpe from the real type.
If branch or tag name is the same as some file in repository, git log
was reporting that as "ambiguous argument 'test': both revision and
filename. Use '--' to separate filenames from revisions".
* magit.el (magit-correct-point-after-command): New.
(magit-post-command-hook): New, to collect all post-command activitiy.
(magit-mode): Use it instead of magit-highlight-section.
(magit-section-set-hidden): Don't touch the rear-stickyness.