Intended to be bound to X instead of magit-reset-working-tree for those who
feel it is a more consistent pair for x. Suggests HEAD and therefore works
like magit-reset-working-tree by default. Eliminates need to use C-u x.
One might argue that this also makes it work better in a case when GIT_DIR
points outside of a work tree, but because in that case any directory is a
valid "top dir" from GIT's point of view, that is debatable. But at least
one can use Magit in that case by first making sure that default-directory
is the top dir and then executing magit-status.
Forces emacs to use pipes for communication with git subprocess.
Although default PTY method should work too, there is probably
something broken in cygwin causing that resulting process never
receives any input and hangs forever.
In any case, setting communication to 'pipe' is recommended by
start-process docs anyway for background processes, as it is usually
faster and more efficient.
Instead of a --numstat diff. This gives more information.
* magit.el (magit-insert-diff-title): Factored out of
magit-wash-diff-section. Don't handle mode changes separately from
content changes.
(magit-wash-raw-diffs, magit-wash-raw-diff): New.
(magit-wash-numstat-diffs, magit-wash-numstat-diff): Removed.
(magit-insert-unstaged-changes): Use git diff-files.
(magit-insert-staged-changes): Use git diff-index.
* magit.el (magit-ref-exists-p): Use correct invocation and turn exit
code into a boolean. (Saturday night hacking sessions are not my
forte. Sundays on the other hand...)
* magit.el (magit-set-section-needs-refresh-on-show): New.
(magit-section-set-hidden): Call magit-refresh when a
'needs-refresh-on-show' section is shown.
(magit-show-level): Wrap it in magit-with-refresh.
(magit-wash-diff, magit-wash-diff-section): Factored washing and
section construction into seperate functions.
(magit-insert-diff, magit-wash-numstat-diffs,
magit-wash-numstat-diff): New. Use magit-insert-diff for visible
sections or for small changes.
(magit-insert-unstaged-changes): Use a numstat diff instead of a full diff.
(magit-insert-staged-changes): Likewise.
* magit.el (magit-list-interesting-refs): Use "git show-ref" instead
of trying to parse output of "git branch". Return alist with name /
ref pairs.
(magit-read-rev, magit-get-svn-branch-name): Updated.
(magit-refresh-wazzup-buffer): Use magit-list-interesting-refs instead
of parsing "git branch" output.
* magit.el (magit-rebase-info): Also look for .git/rebase-apply.
(magit-log-edit): Don't commit in the middle of a rebase, offer to
continue it instead.
(magit-add-log): Likewise.
If you have a topic branch (any branch named t/foo), Magit will create a
section named Topics and show you all outstanding topic branches.
Hitting RET on a topic does a checkout.
This gives users an easy way to interface with external tools like
"topgit". You type !, followed by "tg create t/foo", and then
everything including magit refreshing the buffer gets handled
automatically.
From Tom Tromey. Thanks!
* Makefile.am (elpa): New target to create elpa tarball.
* magit-pkg.el.in: New.
* configure.ac: Create magit-pkg.el from it.
* magit.el: Added autoload for magit-status.
Thanks to Travis B. Hartwell!
* magit.el (magit-get-svn-branch-name): New.
(magit-insert-unpulled-svn-commits, magit-insert-unpushed-svn-commits,
magit-svn-enabled): Use it.
* magit.el (magit-wazzup-ignore): New.
(magit-refresh-wazzup-buffer): Read wazzup-exclude and optionally omit
the branches listed in it. Added 'all' parameter to control this.
(magit-wazzup): Show all branches with prefix.
(magit-ignore-item): Call magit-wazzup-ignore for wazzup branches.
* magit.texi: Document it.
* magit.el (magit-reset-head): Reflect it in the prompt whether this
is going to be a hard reset or not. Added optional argument instead
of using current-prefix-arg directly.
* magit.texi: Document it.
* magit.el: Permit cancelling log edits.
magit-log-edit-confirm-cancellation: New defcustom.
magit-log-edit-map: New keybinding: C-c C-k to cancel the log.
magit-log-edit-cancel-log-message: New function.
magit-pop-to-log-edit: Indicate that cancellation is possible.
Previously it was insisting on a branch named "git-svn", but I'm not
sure if this is ever created by default. Also, there is no need to call
"remote update", and if it is called asynchronously, it blocks the
subsequent call to svn fetch.
* magit.el (magit-log-edit-get-field): New.
(magit-commit-all-when-nothing-staged): New.
(magit-log-edit): Set 'commit-all field accordingly.
(magit-log-edit-commit): Use that field to control "--all" option.
1. Don't report a branch if it has no commit in common with HEAD. This
is for people who keep alternate histories in their repositories.
2. Don't report a branch if another branch with the same basename and
commit as HEAD has already been reported. Thus, if a branch "foo"
with 5 unpulled commits was pushed to origin, don't display both
"foo" and "origin/foo" in the whazzup buffer, since they reflect the
same thing.
* magit.el (magit-prefix-p): Compare components with equal so that it
works for strings.
(magit-process-indicator-from-command): Take
magit-git-standard-options into account when choping off the head.
* magit.el (magit-cherry-pick-commit): Removed, replaced with
magit-apply-item.
(magit-revert-commit): Likewise.
(magit-apply-commit): Use git cherry pick and optionally do everything
magit-cherry-pick-commit and magit-revert-commit could do.
* magit.el (magit-stash-snapshot): Wrap calls to magit-run in one
magit-with-refresh so that magit-revert-files is only called once.
Calling it twice within one second does not work.
* magit.el (magit-insert-hunk-item-region-patch): Pass through "+"
lines for reverse patches.
(magit-apply-hunk-item*): New, factored out of magit-apply-hunk-item
and magit-apply-hunk-item-reverse.
(magit-apply-hunk-item-reverse): New. Use it instead of passing
"--reverse" to magit-apply-hunk-item so that
magit-insert-hunk-item-region-patch knows whether we are applying in
reverse or not.
From John Wiegly.
Defines a number of seconds, after which magit will automatically
popup the magit-process buffer so the user can see what git is up to.
Off by default. I use this because sometimes when a commit or push
takes more than an expected amount of time, I start to wonder what
happened.
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 other day I hacked some file, and all changes obviously split in
two commits logically, but I can't do that because changes from
"different commits" were to close to each other and diff shows them
ina single hunk. There's possibility in git add -i to split current
hunk into smaller ones in such situations. I wanted to do this without
leaving emacs.
Now magit have control over -U<n> option to git-diff.
It was imposible to see what was staged for a first commit on a fresh
git repository. The only visible lines was fatal error messages from
git. Now diff against null tree object is shown in magit status buffer
if nothing was yet commited to the repository. The cost is 15-byte
object added to the repo, but it shuld disappear on first call to git
gc.
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.