* magit.el (magit-anything-staged-p): New.
(magit-update-status): Use it to determine name of the 'unstaged' section.
(magit-log-edit-commit): Pass "--all" to git commit when nothing is staged.
* magit.el (magit-log-edit-map): Define as recommended by the Elisp manual.
(magit-log-edit-append): Renamed from magit-append-to-log-edit.
(magit-log-edit-get-fields, magit-log-edit-set-fields,
magit-log-edit-set-field, magit-log-edit-toggle-amending): New.
(magit-apply-item): Set author.
* magit.el: (magit-section-set-visibility,
magit-section-set-children-visibility,
magit-section-toggle-visibility): New.
(magit-mode-map): Bind the last one to 'TAB'.
* magit.el (magit-shell-exit-code, magit-file-uptodate-p): New.
(magit-run-shell): Use shell-file-name and shell-command-switch
instead of hardcoding "sh" and "-c".
(magit-discard-item): Use "--index" to discard staged changes, but
only allow it when the file is uptodate.
* magit.el (*magit-item-context*): New.
(magit-item): Add context field from *magit-item-context* special
variable.
(magit-insert-section): Set *magit-item-context* to section id while
calling the washer.
(magit-must-be-unstaged, magit-must-be-staged): New:
(magit-stage-item, magit-unstage-item): Use them to fail early.
* magit.el (magit-run-command): Renamed from magit-run, explicitly
take line to log in the buffer.
(magit-run): Use it.
(magit-run-shell): New, use it as well.
* magit.el (magit-mode-map): Bind it to 'A'.
(magit-cherry-pick): New.
(magit-apply-item): Use diff and apply instead of cherry-pick so that
we can change a unclean work tree.
* magit.el (magit-apply-hunk-item): New.
(magit-stage-item, magit-unstage-item): Use it instead of explicit code.
(magit-discard-item): Handle hunks and diffs.
* magit.el (magit-show-commit): Made non-interactive. Scroll window
when requested and appropriate.
(magit-visit-item): Select *magit-commit* buffer when visiting a commit.
(magit-show-item-or-scroll-up, magit-show-item-or-scroll-down): New.
(magit-mode-map): Bind them to SPC and DEL.
* magit.el (magit-unstage-item): It's magit-diff-or-hunk-item-file,
not magit-diffor-hunk-item-file, stupid.
(magit-visit-item): magit-diff-item-position does not exist, use nil
instead.