Marius Vollmer
3300960cad
Merge commit 'jwiegley/master'
2009-02-16 23:59:54 +02:00
John Wiegley
bcb59cac51
Made behavior of M-H and M-h consistent for diffs
2009-02-15 21:38:44 -04:00
John Wiegley
c87154d7f6
Use display-buffer, not pop-to-buffer, when showing magit-process after a delay
2009-02-15 21:08:57 -04:00
Marius Vollmer
cdc036915f
Fix mode line process status.
...
* 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.
2009-02-16 00:29:45 +02:00
Marius Vollmer
bded317bc8
Use Git cherry-pick also for 'a' and Git revert for 'v'.
...
* 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.
2009-02-15 23:58:46 +02:00
Marius Vollmer
1e3f94437e
Pass "--no-pager" to Git.
...
* magit.el (magit-git-standard-options): New. Changed almost all uses
of magit-git-executable to also pass magit-git-standard-options.
2009-02-15 23:58:43 +02:00
Marius Vollmer
35ea9ab265
Improve message when discarding changes in a region.
...
* magit.el (magit-discard-item): Here.
2009-02-15 20:15:46 +02:00
Marius Vollmer
b523d9c15e
Don't use dynamic scoping.
...
* magit.el (magit-refresh-status, magit-insert-staged-changes):
Explicitly pass no-comment parameter.
* magit.el (magit-show-stash): Use 'stash', not 'info.
2009-02-15 20:13:13 +02:00
Marius Vollmer
2913ea0220
Make 'sure' that taking a snapshot does not revert buffers wrongly.
...
* 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.
2009-02-15 20:00:35 +02:00
John Wiegley
c97fa1a0c3
If SPC and DEL are used within a normal text region, just scroll up/down.
2009-02-14 23:58:29 -04:00
Marius Vollmer
d7ae65a579
Distinguish "new file" and "new mode".
...
* magit.el (magit-wash-diff): Here.
2009-02-15 03:28:31 +02:00
Marius Vollmer
24677b0c7a
Put stashes into *magit-stash* so that magit-currently-shown-stash works.
2009-02-15 03:23:45 +02:00
Marius Vollmer
2958f9cfd4
Pass -U arg to diff correctly.
...
* magit.el (magit-refresh-diff-buffer): Don't cons U arg onto 'args'.
2009-02-15 03:23:17 +02:00
Marius Vollmer
b1eec95572
Fix applying parts of patches in reverse.
...
* 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.
2009-02-15 03:11:43 +02:00
Marius Vollmer
a080ca01c1
Clean up the messages produced by magit-init a bit.
...
* magit.el (magit-init): Message fixes. Use yes-or-no-p for
potentially destructive operations.
(magit-status): Message fixes.
2009-02-15 02:26:21 +02:00
Marius Vollmer
b670b16b33
Merge 'voins/init'.
2009-02-15 02:11:06 +02:00
Marius Vollmer
401c548dc5
More info for '?'.
...
* magit.el (magit-describe-item): Add magit-section-context-type.
2009-02-15 02:06:53 +02:00
Marius Vollmer
1b4094e3de
Removed binding for 'K', run git clean when hitting 'k' on the section title.
...
* magit.el (magit-discard-item): Run git clean when point is on the
"Untracked files" section title.
* magit.texi: Document this.
2009-02-15 02:06:06 +02:00
Marius Vollmer
b627c9203a
Merge commit 'voins/diff'
2009-02-15 01:53:00 +02:00
Marius Vollmer
9fc7465d61
Do not use '-x' with git clean.
...
I am afraid that would surprise to many people since "removing
untracked files" means removing the ones listed in the status buffer.
2009-02-15 01:50:11 +02:00
Marius Vollmer
62d9f73aea
Merge commit 'voins/clean'
2009-02-15 01:47:44 +02:00
John Wiegley
d38c05a5ac
M-h and M-H now hides the whole current file/buffer, and M-s/S shows it.
2009-02-15 01:15:55 +02:00
John Wiegley
7910b4c3dd
When popping to the magit-process after a delay, goto point-max.
2009-02-15 01:14:50 +02:00
John Wiegley
efdd97b0b0
For git-svn repositories, 'f' runs git svn fetch in addition to remote update.
2009-02-15 01:09:54 +02:00
Marius Vollmer
e7ef2256e2
Optionally popup the process buffer for asynchronous commands.
...
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.
2009-02-15 00:58:46 +02:00
Marius Vollmer
8b4614b52a
Made commits asynchronous, in case there is a long-running pre-commit hook.
...
* magit.el (magit-run*): Send input to asynchronous processes.
(magit-run-async-with-input): New.
(magit-log-edit-commit): Use it.
2009-02-15 00:50:54 +02:00
John Wiegley
7725bfa2b8
In magit-process-filter, use save-current-buffer instead of save-excursion.
...
Otherwise, the location of point gets messed up for people watching the
buffer.
2009-02-15 00:39:56 +02:00
John Wiegley
a2e14e528f
New command "Z" saves an instant of your index and working in the stash.
...
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.
2009-02-15 00:39:38 +02:00
John Wiegley
0836f17507
Always insert the "Git finished" message at the end of the process buffer.
2009-02-15 00:36:34 +02:00
Alexey Voinov
e66d174f68
Allow smaller or larger hunks when diffing
...
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.
2009-02-12 14:53:18 +03:00
Marius Vollmer
2e17b9e2f7
Performance hack.
...
* magit.el (magit-insert-section): Use char-before instead of looking-back.
2009-02-12 01:40:00 +02:00
Alexey Voinov
dad98cea88
Handle fresh empty repository.
...
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.
2009-02-11 13:37:16 +03:00
Alexey Voinov
9db7719b96
Support for git init
2009-02-11 13:31:19 +03:00
Alexey Voinov
32d59881a3
Support for git clean
2009-02-11 11:09:18 +03:00
Marius Vollmer
f89a045282
Only ever commit staged changes when amending a commit.
...
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.
2009-02-10 23:31:16 +02:00
Marius Vollmer
8a979172c8
Offer current branch as default when merging in Wazzup buffer.
...
* magit.el (magit-guess-branch): New.
(magit-manual-merge, magit-automatic-merge): Use it to get the default
rev to merge.
2009-02-09 03:58:47 +02:00
Marius Vollmer
b825b8899c
Fixlet.
...
* magit.el (magit-find-buffer): Don't try to expand the
default-directory when it is nil.
2009-02-09 02:51:57 +02:00
Marius Vollmer
4ec9df0070
Make the Git executable customizable.
...
* magit.el (magit-git-executable): New. Replaced all hardcoded uses
of "git" with it.
2009-02-08 23:06:49 +02:00
Marius Vollmer
59bd8eccc7
Use the digits to hide and show sections.
...
* 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.
2009-02-08 01:35:56 +02:00
Marius Vollmer
64d24aa143
Make *magit-process* buffer read-only.
...
* magit.el (magit-run*, magit-process-sentinel, magit-process-filter):
Set buffer-read-only and inhibit-read-only as appropriate.
2009-02-07 23:03:28 +02:00
Marius Vollmer
2904e79a08
Make magit-status prompt less.
...
* 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.
2009-02-07 22:50:51 +02:00
Marius Vollmer
5f1c91c98d
Merge commit 'purcell/run-git-svn-async'
2009-02-07 21:50:09 +02:00
Marius Vollmer
160dc9e03d
Git log seems to forget a final newline sometimes.
...
* magit.el (magit-insert-section): Make sure the inserted text ends in
a newline.
2009-02-07 21:20:41 +02:00
Marius Vollmer
2fd55bb413
Wazzup not only for master.
...
* magit.el (magit-wazzup): Don't hardcode "master".
2009-02-05 22:50:19 +02:00
Marius Vollmer
94b8e5acc7
Make stash showing behave like showing commits.
...
* 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.
2009-02-05 22:42:26 +02:00
Marius Vollmer
d65806bd35
Offer completion for 'l' and 'L' and allow end to be specified as well.
...
* 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.
2009-02-05 22:23:57 +02:00
John Wiegley
26d1719fe1
Don't duplicate magit buffers for the same project.
2009-02-04 03:35:56 -04:00
John Wiegley
ce3965cd8a
Made the maximum log length configurable, and defaulting to 100 commits.
2009-02-04 00:33:39 -04:00
John Wiegley
f73a222ed5
Made l/L a little bit smarter.
2009-02-04 00:33:39 -04:00
John Wiegley
8898ef7926
Allow visting of stashes.
2009-02-04 00:33:39 -04:00
Steve Purcell
2ee532a01d
Run git-svn dcommit and rebase asynchronously to avoid blocking the UI
2009-02-02 15:23:31 +01:00
Alexey Voinov
0c6172f180
Handle non-existent directories.
...
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>
2009-02-01 02:45:51 -04:00
Marius Vollmer
09e9d0d4f4
Credit John. Thanks!
2009-01-28 22:23:46 +02:00
John Wiegley
a2dd7a38bd
Add a command, V, which shows information about the current branches.
2009-01-27 17:46:35 -04:00
John Wiegley
63b7adc76b
Add a command, E, which calls git-interactive-rebase to initiate an
...
interactive rebase session using Emacs as the editor.
2009-01-27 17:30:04 -04:00
Marius Vollmer
6c8a668d24
Wazzup section fixes.
...
* magit.el (magit-refresh-wazzup-buffer): Use the branch name as the
title and a type of 'wazzup'.
2009-01-25 01:04:51 +02:00
Marius Vollmer
8f9fb43590
More flexible titles and types for magit-insert-section.
...
* 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.
2009-01-25 01:03:24 +02:00
Marius Vollmer
3baf7f4372
Indentation fixes.
2009-01-25 00:41:03 +02:00
Marius Vollmer
a6bc339e9c
Cleaned up section creation a bit.
...
* 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.
2009-01-25 00:39:03 +02:00
Marius Vollmer
583ecc7a12
Don't highlight the whole log or commit buffer.
...
* 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.
2009-01-24 21:08:25 +02:00
Marius Vollmer
528e13f4a7
Wazzup.
2009-01-24 20:57:53 +02:00
Marius Vollmer
60f09e0615
Clean up types and titles of sections.
...
* 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.
2009-01-24 20:56:42 +02:00
Marius Vollmer
0ce0a2524f
Be smarter about correcting point.
2009-01-24 20:45:34 +02:00
Marius Vollmer
ef809ab4d3
Remove debugging messages.
2009-01-24 20:42:34 +02:00
Marius Vollmer
f95f34e695
Acknowledge Alexey.
2009-01-22 00:47:55 +02:00
Alexey Voinov
c691bc7800
Allow unmarking the marked commit.
...
Once, I hit "." instead of "r ." by accident and have found no way to
reset this mark. This just seems not to be right.
2009-01-22 00:47:50 +02:00
Alexey Voinov
76406385a2
Fixed visualization of marked commits
...
Face of previously marked commit was not restored when marking
another. Also red color looks really bad on dim gray
background. Orange is much better.
2009-01-22 00:46:06 +02:00
Marius Vollmer
c3830edab8
Make it work better on Windows. Thanks to Jeff Dik.
...
* magit.el (magit-find-buffer): Expand the default-directory.
2009-01-19 01:33:15 +02:00
Marius Vollmer
3433556d03
Merge commit 'fdr/sign-off'
2009-01-19 01:22:01 +02:00
Marius Vollmer
3e2905924a
Merge commit 'cymacs/master'
2009-01-19 01:18:35 +02:00
Alexey Voinov
10fe99adb4
Ambiguity in call to git log fixed
...
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".
2009-01-19 01:06:04 +02:00
Marius Vollmer
3d34a7ca21
Make buffer saving behavior customizable.
...
Thanks, Geralt!
* magit.el (magit-save-some-buffers): New.
(magit-status): Use it.
2009-01-19 00:56:12 +02:00
Marius Vollmer
64b8265ad3
Removed unused threshold machinery.
...
* magit.el (magit-current-section): Removed threshold argument.
Updated all callers.
(magit-collapse-threshold): Removed.
2009-01-19 00:55:26 +02:00
Marius Vollmer
b430adda17
Make sure that point never ends up in an invisible region.
...
* 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.
2009-01-19 00:24:11 +02:00
René Stadler
45fb865e1b
Fix incorrect diff hightlighting of lines beginning with "+" or "-".
2009-01-09 23:21:02 +02:00
René Stadler
b7fe74520d
Disable undo in all magit-mode buffers.
...
Saves lots of memory and prevents triggering a scary warning when Emacs detects
the massive amount of undo usage.
2009-01-09 23:20:58 +02:00
Daniel Farina
68344a20a0
Add signoff customization option
...
Signed-off-by: Daniel Farina <drfarina@acm.org>
2008-12-17 02:23:20 -08:00
Marius Vollmer
b30faeb310
Merge commit 'voins/voins'
2008-11-30 22:37:42 +02:00
Marius Vollmer
f055b18754
Typo.
...
* magit.el (magit-marked-commit): Fix typo in error message.
2008-11-30 22:31:22 +02:00
Alexey Voinov
7386af19b5
Use "medium" git log format when visiting commit
...
Visiting commit does not always work well when default git log format
was changed. This change makes git log explicitly use "medium" format,
which is out of the box default value.
2008-11-28 23:56:50 +03:00
Marius Vollmer
54ad9f00c8
Added Alex and Marcin to copyright header.
2008-11-13 20:48:55 +02:00
Marcin Bachry
2c45b73d01
Added `magit-copy-item-as-kill' command.
...
* magit.el (magit-copy-item-as-kill): new command to copy sha1 of
commit at point into kill ring.
2008-11-13 00:19:04 +02:00
Marcin Bachry
0bbb824fcd
Fixed `magit-goto-previous-section' not showing proper commit in
...
commit buffer.
* magit.el (magit-show-commit): don't shadow "commit" parameter in let
form
* magit.el (magit-show-commit): accept both string and section struct
as "commit" parameter
2008-11-13 00:08:16 +02:00
Marius Vollmer
e2fa665ba1
Different tag and head label colors for different backgrounds
2008-11-13 00:07:34 +02:00
Marcin Bachry
f6956593bc
Show gitk-style coloured tag and head labels in log buffer.
2008-11-12 23:46:41 +02:00
Marcin Bachry
ef3e0d0c5a
Washing functions in `magit-insert-section' couldn't set face text
...
property.
* magit.el (magit-refresh-marked-commits-in-buffer): don't overwrite
face property if not needed
2008-11-12 23:46:18 +02:00
Marcin Bachry
4e274b5941
Faster way to diff working tree with HEAD.
...
* magit.el (magit-diff-working-tree): assumes "HEAD" if not revision
was given in minibuffer.
2008-11-12 23:45:44 +02:00
Alex Ott
fe7ffeb943
Add keybindings for git-svn commands.
...
* magit.el (magit-mode-map): Bind magit-svn-rebase and
magit-svn-dcommit.
* magit.texi (Top): Document it.
2008-11-11 22:50:44 +02:00
Alex Ott
2007a3714e
Initial support for git svn.
2008-11-11 20:00:24 +02:00
Marius Vollmer
7ac76de47c
Stashing.
...
* magit.el (magit-wash-stash, magit-wash-stashes): New.
(magit-insert-stashes): New.
(magit-refresh-status): Call it.
(magit-stash): New.
(magit-mode-map, magit-mode-menu): Bind it.
(magit-apply-item, magit-cherry-pick-item, magit-discard-item): Deal
with stashes.
* magit.texi: Document stashing.
2008-11-10 00:07:08 +02:00
Marius Vollmer
cafd4b93de
(Updated TODO)
2008-11-09 23:21:43 +02:00
Marius Vollmer
88baa2e066
Make the magic fields in the commit message more explicit.
...
* magit.el (magit-log-header-end): New.
(magit-log-edit-get-fields, magit-log-edit-set-fields): Look for and
insert it.
2008-11-09 23:13:17 +02:00
Marius Vollmer
157bee4bf5
Even more control for pushing.
...
* magit.el (magit-push): Always push the current branch and nothing
else. Ask for a remote when none is configured yet and set it. Also
ask when given a prefix argument, but don't set it as default in that
case.
* magit.texi (Pushing and Pulling): Document this.
2008-11-07 00:20:13 +02:00
Marius Vollmer
a96b8763b5
More control over pushing.
...
* magit.el (magit-read-remote): New.
(magit-push): Read remote when given a prefiy argument.
2008-11-07 00:00:37 +02:00
Marius Vollmer
201822e96f
Basic support for tagging.
...
* magit.el (magit-tag, magit-annotated-tag): New.
(magit-log-edit-commit): Run "git tag" when tag field is set.
(magit-mode-map): Add them to 't' and 'T', respectively.
(magit-mode-menu): Add them as well.
(magit-pop-to-log-edit): New.
(magit-log-edit): Use it after removing the tag field.
2008-11-06 23:46:29 +02:00
Marius Vollmer
ee7070af15
Bring back the stars.
...
* magit.el (magit-insert-unpulled-commits,
magit-insert-unpushed-commits): Explicitly include a asterisk in
output.
2008-11-06 22:53:49 +02:00
Marius Vollmer
121ded3274
Offer tags as well when asking for a revision.
...
* magit.el (magit-list-interesting-revisions): Append output of "git tags".
2008-11-06 19:12:58 +02:00
Marius Vollmer
b1f4a36f58
Survive old Gits that do not understand git name-rev --always.
...
* magit.el (magit-name-rev): Don't use --always.
2008-10-29 20:22:13 +02:00
Marius Vollmer
29593edf42
Survive old Gits that don't understand --graph.
...
* magit.el (magit-insert-unpulled-commits,
magit-insert-unpushed-commits): Don't pass "--graph" to git log.
(magit-have-graph, magit-configure-have-graph): New.
(magit-refresh-log-buffer): Use them to only pass --graph to git log
when it will work.
2008-10-29 19:02:20 +02:00
Marius Vollmer
ffac0a3b19
Declare macros before use.
...
* magit.el (magit-with-refresh): Move before first use.
2008-10-26 23:58:08 +02:00
Marius Vollmer
7f38df860d
Fix copyright notice and description.
2008-10-16 22:24:35 +03:00
Marius Vollmer
adc3638400
Updated TODO.
2008-10-16 01:02:35 +03:00
Marius Vollmer
15572962a0
Make sure that magit-run-with-input runs in the right directory.
...
* magit.el (magit-run*): Set default-directory of the input buffer.
2008-10-16 01:01:32 +03:00
Marius Vollmer
ed55932caf
Released 0.6-1.
2008-10-13 00:34:43 +03:00
Marius Vollmer
1059876c19
Directly use buffer for the commit message.
...
* magit.el (magit-log-edit-commit).
2008-10-12 03:33:34 +03:00
Marius Vollmer
5e231defde
Fixes.
...
* magit.el (magit-discard-diff): It's "diff" not "item", stupid.
Fixes.
(magit-use-region-p): New, for compatibility.
2008-10-12 03:07:05 +03:00
Marius Vollmer
14004f41c6
Stage/unstage, etc individual lines.
...
* magit.el (magit-insert-region, magit-insert-current-line): New.
(magit-insert-hunk-item-region-patch): New.
(magit-run*): Added 'input' parameter.
(magit-run-with-input): New.
(magit-diff-item-insert-header, magit-insert-diff-item-patch,
magit-insert-hunk-item-patch, magit-apply-diff-item): Rewritten to
use *magit-tmp* buffer instead of a file.
(magit-apply-hunk-item): Likewise, and also restrict the patch to the
region when appropriate.
(magit-discard-item): Make sure that diff items that are not in the
staged or unstaged sections can not be discarded.
* magit.texi: Document it all.
2008-10-12 02:51:45 +03:00
Marius Vollmer
8a96fa09d1
Different hide/show behavior.
...
* magit.el (magit-expand-collapse-section): New.
(magit-mode-map): Bind TAB to magit-toggle-section and S-TAB to
magit-expand-collapse-section.
* magit.texi: Document it.
2008-10-12 02:51:45 +03:00
Marius Vollmer
138ac10b34
The "Untracked files" section is back, with better ignoring.
...
* magit.el (magit-wash-untracked-file, magit-wash-untracked-files,
magit-insert-untracked-files): New.
(magit-insert-unstaged-changes): Don't include other files in output.
(magit-mode-map): '1' jumps to untracked files instead of unpulled
changes.
(magit-stage-item, magit-discard-item, magit-visit-item):
Handle untracked files.
(magit-ignore-file): New.
(magit-ignore-item): Use it.
(magit-ignore-item-locally): New.
(magit-mode-map): Bind it to "I".
* magit.texi: Document it all.
2008-10-12 02:51:39 +03:00
Marius Vollmer
871bf2f2d6
Re-added magit-write-diff-item-patch.
...
* magit.el (magit-write-diff-item-patch): New, it got lost somewhere...
2008-10-10 15:57:37 +03:00
Marius Vollmer
0264295302
Make discarding work again.
...
* magit.el (magit-discard-item): Don't escape twice.
2008-10-10 15:50:32 +03:00
Marius Vollmer
f2e8155904
Updated TODO.
2008-10-02 23:23:36 +03:00
Marius Vollmer
c236092857
Update commit display when moving with 'n' and 'p'.
...
* magit.el (magit-show-commit): When showing a new section, make sure
point is at the beginning.
(magit-goto-previous-section, magit-goto-next-section): Show section
when in a log or reflog buffer.
2008-10-02 23:22:53 +03:00
Marius Vollmer
8f8426b770
Speed up buffer reverting.
...
* magit.el (magit-revert-buffers): Do not use "git ls-files", just
consider all buffers.
2008-10-02 23:11:44 +03:00
Marius Vollmer
70a072a487
Updated TODO.
2008-10-02 23:01:22 +03:00
Marius Vollmer
ce3b83fabd
Updated TODO.
2008-10-02 01:24:44 +03:00
Marius Vollmer
a378cdacb6
Bugfix.
2008-10-02 01:19:23 +03:00
Marius Vollmer
fcfc70c136
Avoid some unnecessary refreshes.
...
* magit.el (magit-refresh-wrapper): Only revert files and refresh
status buffer when there is at least one buffer in need of refresh.
2008-10-02 01:18:25 +03:00
Marius Vollmer
1f74c1b0c1
Improve log editing.
...
* magit.el (magit-log-fill-paragraph, magit-log-edit-mode): New, for
better paragraph filling.
(magit-log-edit): Use it.
(magit-add-log): Add entries also for diffs. Be more careful when
inserting new function sub-entries into existing file entries.
2008-10-02 01:12:32 +03:00
Marius Vollmer
e20322754c
Speed up construction of buffers with a lot of sections.
...
* magit.el (magit-new-section): Collect children in reverse.
(magit-with-section): Reverse them when done.
(magit-refresh-log-buffer): Limit to 1000 commits.
(magit-refresh-reflog-buffer): Likewise.
2008-09-30 23:47:16 +03:00
Marius Vollmer
fcd6bfcaf7
Always refresh the status buffer.
...
* magit.el (magit-refresh-wrapper): Initialize
magit-refresh-needing-buffers with the status buffer.
(magit-need-refresh): Don't add a buffer twice.
2008-09-29 23:35:39 +03:00
Marius Vollmer
e6e3aa1b3a
Added menu.
...
* magit.el (magit-mode-menu): New.
2008-09-28 02:18:01 +03:00
Marius Vollmer
59aac28585
Updated manual and TODO.
2008-09-27 15:26:09 +03:00
Marius Vollmer
d48fd13d27
Handle revs that don't have a name.
...
* magit.el (magit-name-rev): Return original rev if name-rev returns
"undefined". Shouldn't happen, but does. Bug in git?
2008-09-26 16:10:17 +03:00
Marius Vollmer
e5b55cbce0
Merge branch 'master' of zagadka.vm.bytemark.co.uk:git/magit
2008-09-26 15:49:08 +03:00
Marius Vollmer
3b6c739514
Updated TODO.
2008-09-26 15:48:49 +03:00
Marius Vollmer
0e1d9ddbbb
Let magit-status always ask for the directory.
...
* magit.el (magit-read-top-dir): Removed 'prefix' argument. Always ask.
2008-09-25 23:21:59 +03:00
Marius Vollmer
efc8ae2a6c
Rewritten refresh mechanics.
...
* magit.el (magit-refresh-buffer): Renamed from magit-refresh, made
non-interactive.
(magit-need-refresh): New. Call it whenever needed and instead of
magit-refresh and magit-revert-buffers.
(magit-with-refresh): New.
(magit-refresh): Reimplemented using these two.
(magit-section-action): New. Use it instead of magit-section-case in
commands.
(magit-run*, magit-cherry-pick-commit): Removed norefresh argument.
(magit-run, magit-run-shell): Use magit-with-refresh.
2008-09-21 16:09:11 +03:00
Marius Vollmer
87a437fab9
Prefer symbolic names for default revisions.
...
* magit.el (magit-name-rev): Do nothing when given nil.
(magit-default-rev): Pass commit thru magit-name-rev.
2008-09-15 02:43:36 +03:00
Marius Vollmer
7853395831
Clean up shell escaping.
...
* magit.el (magit-shell, magit-shell-lines, magit-shell-exit-code,
magit-run-shell) Escape all format arguments when constructing the
command. Updated all callers.
2008-09-15 02:37:38 +03:00
Marius Vollmer
e0e9544c09
Updated TODO.
2008-09-15 02:01:58 +03:00
Marius Vollmer
35002f3d31
Refresh buffer when rewrite-finish fails.
...
* magit.el (magit-rewrite-finish): Refresh after finishing, even when
an error has been thrown.
(magit-rewrite-finish-step): Don't refresh at all.
2008-09-15 01:58:08 +03:00
Marius Vollmer
b68b2171cf
Refuse to apply, cherry-pick, or revert a merge commit.
...
* magit.el (magit-commit-parents): New.
(magit-apply-commit, magit-revert-commit): Fail with merge commits.
(magit-cherry-pick-commit): New. Fail with merge commits. Use it everywhere
instead of running git cherry-pick directly.
(magit-cherry-pick, magit-cherry-pick-item): Renamed.
2008-09-15 01:58:01 +03:00
Marius Vollmer
f34fee9759
Keep point where it was across a refresh.
...
* magit.el: Don't move point in refresh functions.
(magit-refresh): Try to keep point where it was.
(magit-run*): Call magit-refresh outside of the save-excursion so that
it can move point.
2008-09-15 00:46:40 +03:00
Marius Vollmer
9214dccd6f
Clean up applying/reverting pending commits a bit.
...
* magit.el (magit-apply-item, magit-cherry-pick, magit-revert-item):
Don't bother to check return value of magit-apply-commit, it either
succeeds or throws an error.
2008-09-15 00:46:40 +03:00
Marius Vollmer
4b3f8fb86a
Keep log-edit message around in case commit fails.
...
* magit.el (magit-log-edit-commit): Erase buffer committing.
2008-09-15 00:46:40 +03:00
Marius Vollmer
d25fb236fe
Merged synchronous and asynchronous command running.
...
* magit.el (magit-execute*, magit-run*): Renamed former to latter.
Added nowait parameter.
(magit-run, magit-run-async): Renamed. Implemented in terms of new
magit-run*.
(magit-execute, magit-run): Renamed.
(magit-execute-shell, magit-run-shell): Renamed.
(magit-revert-files, magit-revert-buffers): Renamed.
(magit-run-command): Removed.
2008-09-15 00:46:40 +03:00
Marius Vollmer
bbcb7747ef
Rebase synchronously.
2008-09-14 02:49:17 +03:00
Marius Vollmer
c835d6d7b1
Doc updates.
2008-09-14 02:42:01 +03:00
Marius Vollmer
bc13e8a06f
Mark pending commits as used/unused only when the apply/revert succeeded.
2008-09-14 02:21:48 +03:00
Marius Vollmer
973f8436c6
Synchronous execution of most commands.
...
* magit.el (magit-execute*, magit-execute-shell, magit-execute): New.
Use them in a ton of places instead of magit-run, etc.
2008-09-14 02:17:47 +03:00
Marius Vollmer
c40915abab
Updated TODO.
2008-09-14 01:18:40 +03:00
Marius Vollmer
dc283dec8f
Revert files when stopping the rewrite at the end of a magit-rewrite-finish.
2008-09-14 01:14:47 +03:00
Marius Vollmer
c66e0c5466
Don't refresh when a run-command continuation is given.
2008-09-14 01:14:46 +03:00
Marius Vollmer
6c6ebd0183
Always refresh the status buffer when a command finishes.
2008-09-14 01:14:46 +03:00
Marius Vollmer
1e68bdaa90
Make status buffer current while committing.
2008-09-14 01:14:46 +03:00
Marius Vollmer
dc12f07f65
Don"t ask whether to stop at the end of magit-rewrite-finish.
...
* magit.el (magit-rewrite-stop): Added optional noconfirm parameter.
(magit-rewrite-finish-step): Use it.
2008-09-14 01:14:46 +03:00
Marius Vollmer
3d80d64b3c
Set pending commit to used only when cherry-pick was successful.
2008-09-14 01:14:46 +03:00
Marius Vollmer
57bc4a786d
Call the run-command continuation with the original buffer current.
2008-09-14 01:14:46 +03:00
Marius Vollmer
42e6d0b07a
Allow arguments to the continuation of magit-run-command.
...
* magit.el (magit-run-command): Changed parameters to allow for
arguments to the continuation. Changed all callers.
(magit-process-sentinel): Allow quitting when calling the
continuation.
(magit-refresh): Added optional buffer parameter.
2008-09-14 01:14:46 +03:00
Marius Vollmer
99dae2441e
Applying and reverting hunks and diffs.
2008-09-14 01:14:46 +03:00
Marius Vollmer
c93e41b5bb
Functions for applying diffs.
...
* magit.el (magit-diff-item-write, magit-apply-diff-item): New.
2008-09-14 01:14:46 +03:00
Marius Vollmer
a2b7afc6b5
Bugfix.
...
* magit.el (magit-toggle-section): Call magit-section-set-hidden with
two args, stupid.
2008-09-14 01:14:46 +03:00
Marius Vollmer
559398acf9
More general refresh machinery.
...
* magit.el (magit-refresh, magit-refresh-all): New. Bind to "g" and
"G". Replaced all calls to magit-update-status with magit-refresh.
(magit-mode-init): Added refresh-func and refresh-args,
remember them for magit-refresh and call magit-refresh at the end.
Updated all users.
(magit-set-mode-line-process): Put process indicator into the mode
line of all magit-mode buffers.
2008-09-14 01:14:46 +03:00
Marius Vollmer
2fdf8c02ef
Updated TODO.
2008-09-14 01:14:46 +03:00
Marius Vollmer
9785c5a1c9
Updated TODO.
2008-09-11 01:25:30 +03:00
Marius Vollmer
2ff4d8918b
Bugfix magit-apply-commit and magit-revert-commit.
...
* magit.el (magit-apply-commit, magit-revert-commit): The parameter is
called "commit", not "info", stupid.
2008-09-11 01:08:23 +03:00
Marius Vollmer
d7f0a8dc5a
Support for marking pending commits used and unused.
...
* magit.el (magit-rewrite-set-used, magit-rewrite-set-unused): New.
(magit-mode-map): Bind them.
2008-09-11 00:09:05 +03:00
Marius Vollmer
bfd8f4baa0
Rewrite finishing.
...
* magit.el (magit-rewrite-finish, magit-rewrite-finish-step,
magit-rewrite-finish-continuation): New.
2008-09-11 00:08:34 +03:00
Marius Vollmer
a91d10c74b
More features for magit-run-command.
...
* magit.el (magit-run-command): Added erase and cont parameters.
Construct logline from cmd and args when nil.
(magit-process-sentinel): Call magit-process-continuation when set.
2008-09-11 00:06:08 +03:00
Marius Vollmer
6089e3b9db
Updated TODO.
2008-09-11 00:03:05 +03:00
Marius Vollmer
bc1836a7b1
Speed up log washing.
...
* magit.el (magit-wash-log): Bind magit-old-top-section to nil while
washing log entries so that no time is wasted looking up the old
visbility state.
2008-09-11 00:03:04 +03:00
Marius Vollmer
666459c85d
Don't propertize used pending commits.
...
The face gets overwritten by the marked commits machinery. (And there
was a typo.)
2008-09-09 01:16:24 +03:00
Marius Vollmer
d4c263386f
Make diff washing work again in commit buffers.
...
* magit.el (magit-wash-diffs, magit-wash-log, magit-wash-commit):
Don't go to point-min, it's redundant for magit-insert-section now
and harmful when used in other contexts.
2008-09-09 01:05:41 +03:00
Marius Vollmer
e4031528aa
Use pending commit properties when applying, cherrypicking, and reverting.
2008-09-09 00:55:53 +03:00
Marius Vollmer
ff65089041
Pending commit properties.
2008-09-09 00:55:33 +03:00
Marius Vollmer
95185b0ada
Add rewrite key bindings.
2008-09-09 00:55:09 +03:00
Marius Vollmer
998638ff1a
Renamed "Unrewritten changes" to "Pending changes".
2008-09-08 23:39:55 +03:00
Marius Vollmer
c9a4735c11
Deal with more than one modified file when showing a commit.
...
* magit.el (magit-wash-commit): Call magit-wash-diffs instead of
magit-wash-diff to handle more than one diff.
2008-09-08 23:32:02 +03:00
Marius Vollmer
0efe4c71b5
Don't hide all diffs by default.
...
* magit.el (magit-hide-diffs): New variable.
(magit-wash-diff): Use it for the default hiddenness of diffs.
(magit-insert-unstaged-changes, magit-insert-staged-changes,
(magit-insert-unrewritten-changes): Bind it to t.
2008-09-08 23:31:12 +03:00
Marius Vollmer
4f8dd6f841
Hide diffs by default.
...
* magit.el (magit-new-section): Type rest arg for initializing the new
section structure.
(magit-with-section): Generalize type argument to allow a list of
keyword value pair and pass them to magit-new-section.
(magit-wash-diff): Make diffs hidden by default.
2008-09-08 23:21:01 +03:00
Marius Vollmer
2bf9c19866
Better handling of hidden sections with 'n' and 'p'.
...
* magit.el (magit-goto-next-section, magit-prev-section): Don't
descend into hidden sections.
2008-09-08 23:19:12 +03:00
Marius Vollmer
246eb467b7
Updated TODO.
2008-09-08 12:19:53 +03:00
Marius Vollmer
c9164c5d0b
Deal with empty diffs.
...
* magit.el (magit-create-buffer-sections): Create top section if body
hasn't created any.
2008-09-07 23:42:11 +03:00
Marius Vollmer
993354b867
Unrewritten changes. (R)
2008-09-07 23:35:16 +03:00
Marius Vollmer
1b6133b622
Stopping. (R)
2008-09-07 23:19:10 +03:00
Marius Vollmer
25b0d795af
Rewrite starting. (R)
2008-09-07 23:16:56 +03:00
Marius Vollmer
8460d4db78
Rewrite aborting. (R)
2008-09-07 23:12:55 +03:00
Marius Vollmer
8897b0552c
Some fundamentals for interactive rewrite. (R)
2008-09-07 23:12:32 +03:00
Marius Vollmer
1f252fb554
Updated TODO.
2008-09-07 20:27:16 +03:00
Marius Vollmer
c0938fa2a2
Include untracked files in the unstaged changes section.
2008-09-07 20:24:41 +03:00
Marius Vollmer
d5769cd617
Bugfix.
...
* magit.el (magit-prefix-p): Terminate when reaching the end of the list.
2008-09-07 20:23:52 +03:00
Marius Vollmer
fdee20de6f
Properly discard file deletions.
...
* magit.el (magit-discard-item): Reset a deleted file before checking
it out. Otherwise a staged deletion can not be undone.
2008-09-07 19:47:41 +03:00
Marius Vollmer
d80109e4ef
Properly discard new files.
...
* magit.el (magit-discard-item): Use git rm to discard new files.
2008-09-07 17:37:57 +03:00
Marius Vollmer
e4ccc99536
Move unpulled commits before local changes.
2008-09-07 17:24:32 +03:00
Marius Vollmer
72fa30a698
Renamed "unmerged" to "unpulled".
2008-09-07 16:50:30 +03:00
Marius Vollmer
8c09f66694
Experimental showing of unmerged commits.
...
* magit.el (magit-insert-unmerged-commits): New.
(magit-update-status): Use it.
2008-09-07 16:48:44 +03:00
Marius Vollmer
6b839c8df0
Cleanly unstage file deletions.
...
* magit.el (magit-unstage-item): Use "-q" to shut up git reset when
unstaging a deletion. Otherwise it would complain about local
changes.
2008-09-07 16:45:46 +03:00
Marius Vollmer
0721a4c951
Bug fix.
...
* magit.el (magit-visit-item): It's magit-diff-item-file, stupid.
2008-09-07 16:44:18 +03:00
Marius Vollmer
79c901b71a
Don't detect renames yet. Record more information for diffs.
2008-09-07 16:32:11 +03:00
Marius Vollmer
6b464fd509
Use "Unmerged" instead of "Unresolved".
2008-09-07 15:38:24 +03:00
Marius Vollmer
ce964ab2e1
Have a stab at detecting unresolved files.
2008-09-07 14:41:14 +03:00
Marius Vollmer
6935045e82
Updated TODO.
2008-09-07 05:27:57 +03:00
Marius Vollmer
e5ec239c31
Indicate deleted and renamed files.
2008-09-07 05:25:35 +03:00
Marius Vollmer
a379bb1e0f
Better file status indication.
...
* magit.el (magit-wash-diff): Grep diff header for status of file.
2008-09-07 05:19:11 +03:00
Marius Vollmer
8ca446c4bd
Detect renamed files.
...
* magit.el (magit-insert-staged-changes): Pass "-M" to git diff.
2008-09-07 05:12:32 +03:00
Marius Vollmer
5f34a05b3a
Refactored magit-update-status.
2008-09-07 03:53:25 +03:00
Marius Vollmer
d045293801
Make sure that there is always a current section.
...
* magit.el (magit-current-section): Return magit-top-section when
there is no magit-section property. This happens at eob.
2008-09-07 03:24:14 +03:00
Marius Vollmer
4623a798b3
More functions for visibility control.
2008-09-07 03:19:52 +03:00
Marius Vollmer
d6e4c40364
Fix visibility memory. How did this ever work?
...
* magit.el (magit-top-section): Make the right variable permanent.
(magit-new-section): Don't fail when there are no old sections.
2008-09-07 03:15:37 +03:00
Marius Vollmer
0ea2d919c8
Put point at start of log.
...
* magit.el (magit-log): Goto point-min.
(magit-reflog): Likewise.
2008-09-07 02:23:22 +03:00
Marius Vollmer
d100f40298
Remember section visibility across buffer reconstructions.
...
* magit.el (magit-new-section): Find old section and inherit hidden
attribute.
(magit-create-buffer-sections): Make old top section available to
magit-new-section.
2008-09-07 02:15:45 +03:00
Marius Vollmer
c315191639
Big rewrite of the 'section' and 'item' machinery.
2008-09-07 02:00:26 +03:00
Marius Vollmer
6d4414d826
Properfy TODO.
2008-09-04 20:50:17 +03:00
Marius Vollmer
49c2e544cc
Make author email and date work as well.
...
* magit.el (magit-log-edit-setup-author-env): Cope with setenv
destroying the match data.
2008-09-03 23:40:42 +03:00
Marius Vollmer
a64949523c
Fix process filter.
...
* magit.el (magit-process-filter): Use 'position' instead of a regexp
search to find last ^M. Regexps have trouble with newlines.
2008-09-02 23:36:33 +03:00
Marius Vollmer
d1f0df38f9
Better handling of running counters in Git output.
...
* magit.el (magit-process-filter): New, for dealing with ^M in output.
(magit-run-command): Install it.
2008-09-02 23:18:23 +03:00
Marius Vollmer
2f4c2eed23
List modified files in a nicer way.
...
* magit.el (magit-wash-diff): Insert header line for diffs. Updated
all functions that know where a diff begins.
2008-09-02 01:36:06 +03:00
Marius Vollmer
55a7c63c51
TODO
2008-09-01 01:44:11 +03:00
Marius Vollmer
9f6f5b3c19
Enable standard M-n and M-p in log-edit buffer.
...
* magit.el (magit-log-edit-push-to-comment-ring): New.
(magit-log-edit-commit): Use it.
(magit-log-edit-map): Bind M-n and M-p to log-edit functions.
2008-09-01 01:10:07 +03:00
Marius Vollmer
a040eb8038
Bugfix.
...
* magit.el (magit-revert-item): Use magit-log-edit-append instead of
the removed magit-append-to-log-edit.
2008-08-31 21:49:14 +03:00
Marius Vollmer
db06a91204
Automatically collapse big "Changes" sections.
...
* magit.el (magit-collapse-threshold): New.
(magit-insert-section): Take threshold argument. Updated all callers.
2008-08-31 20:04:02 +03:00
Marius Vollmer
05174053c5
Handle "Author:" field in log edit buffer.
...
* magit.el (magit-log-edit-setup-author-env): New.
(magit-log-edit-commit): Use it.
2008-08-31 19:34:42 +03:00
Marius Vollmer
ef8cfa1b28
Oops.
2008-08-31 19:16:58 +03:00
Marius Vollmer
b84719b56b
Cosmetics.
2008-08-31 19:11:32 +03:00
Marius Vollmer
4ec82c45de
Reflog browsing.
...
* magit.el (magit-reflog, magit-reflog-head): New.
(magit-mode-map): Bind them to 'h' and 'H' respectively.
2008-08-31 18:47:26 +03:00
Marius Vollmer
c0d6281dd8
Support for committing without staging.
...
* 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.
2008-08-31 18:30:37 +03:00
Marius Vollmer
d49639463a
Updated TODO.
2008-08-31 18:20:10 +03:00
Marius Vollmer
2a5da19c7f
Commit amending.
...
* magit.el (magit-log-edit-commit): Look at 'amend' field and pass
"--amend" to git commit when true.
2008-08-31 18:18:46 +03:00
Marius Vollmer
1e7a9e3d66
Support for fields in the log-edit buffer.
...
* 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.
2008-08-31 18:11:38 +03:00
Marius Vollmer
4f3d2ee26f
Updated TODO.
2008-08-31 02:52:17 +03:00
Marius Vollmer
69288bf030
More interesting hide/show behavior.
...
* 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'.
2008-08-31 02:50:04 +03:00
Marius Vollmer
f042b74925
Fix magit-section-beginning-position.
...
* magit.el (magit-section-beginning-position): Just search backwards
for the first property change, don't try to skip over children.
2008-08-31 02:48:05 +03:00
Marius Vollmer
ae5b5d4fe0
Better indication of "git remote update" in mode line.
...
* magit.el (magit-process-indicator-from-command): New.
(magit-run-command): Use it.
2008-08-31 00:41:22 +03:00
Marius Vollmer
7ad6d4dd55
Don't fail in magit-describe-item when item is nil.
2008-08-31 00:34:03 +03:00
Marius Vollmer
864248a582
Better discarding of staged changes.
...
* 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.
2008-08-31 00:28:58 +03:00
Marius Vollmer
a284ac86ff
Don't allow staging/unstaging in the wrong context.
...
* 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.
2008-08-30 23:18:27 +03:00
Marius Vollmer
12ae7132c4
Make reverting work with unclean working trees.
...
* magit.el (magit-revert-item): Like with magit-apply-item, use diff
plus apply instead of revert so that we can work with a unclean working tree.
2008-08-30 22:47:43 +03:00
Marius Vollmer
c1cce797d0
Updated TODO.
2008-08-30 22:44:06 +03:00
Marius Vollmer
8912ac22fc
New magit-run-shell utility.
...
* 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.
2008-08-30 22:34:40 +03:00
Marius Vollmer
1658e50c0d
Only show the first line of a section when hiding it, not the whole header.
2008-08-30 22:32:30 +03:00
Marius Vollmer
45055cdf3e
Real cherry picking.
...
* 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.
2008-08-30 21:37:01 +03:00
Marius Vollmer
45bff9c642
Pre-fill the log-edit buffer for reverts and cherry-picks.
...
* magit.el (magit-append-to-log-edit, magit-escape-for-shell,
magit-format-commit): New.
(magit-apply-item, magit-revert-item): Use them.
2008-08-30 21:15:02 +03:00
Marius Vollmer
226ad5a956
More discarding.
...
* 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.
2008-08-30 20:54:51 +03:00
Marius Vollmer
1161d292f6
Goto "Unstaged changed" when creating status buffer.
...
* magit.el (magit-update-status): Goto first unstaged change when
point is still at beginning of buffer.
2008-08-30 20:37:44 +03:00
Marius Vollmer
4916b98e4a
Use *magit-log-edit* as buffer name.
2008-08-29 01:39:01 +03:00
Marius Vollmer
670cbf80e5
Use dim gray for dark background color classes.
...
Thanks to Phil Hagelberg!
2008-08-24 05:37:13 +03:00
Marius Vollmer
20c9eccccf
Rewrite apply and revert using magit-item-case.
2008-08-24 05:28:38 +03:00
Marius Vollmer
7bbde7724d
Oops.
2008-08-24 05:26:21 +03:00
Marius Vollmer
1d5385b782
Rewritten sections. Initial hide/show of sections.
2008-08-24 05:21:36 +03:00
Marius Vollmer
f6b57a77dc
Bugfix.
...
* magit.el (magit-visit-item): Pass commit to magit-show-commit, as required.
2008-08-24 03:33:24 +03:00
Marius Vollmer
8b4b909821
Improve visiting and scroll the other window.
...
* 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.
2008-08-24 03:01:29 +03:00
Marius Vollmer
322208708e
Nicer dispatching on item types.
...
* magit.el (magit-item-case): New.
(magit-stage-item, magit-unstage-item, magit-ignore-item,
magit-discard-item, magit-visit-item): Use it.
2008-08-24 02:31:49 +03:00
Marius Vollmer
358ed0abd0
Garbage collection.
2008-08-24 02:30:26 +03:00
Marius Vollmer
dc371ff868
Make status buffer names special. Thanks to John Wiegley!
...
* magit.el (magit-status): Use a name of the form "*magit: foo*
instead of just "foo".
2008-08-24 00:59:10 +03:00
Marius Vollmer
ea626dbb0e
Fix two bugs from introducing the item abstraction.
...
* 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.
2008-08-21 22:58:33 +03:00
Marius Vollmer
52abed7629
Discarding items.
...
* magit.el (magit-discard-item): New.
(magit-mode-map): Bind it to 'k'.
2008-08-21 02:41:43 +03:00
Marius Vollmer
909c793cf2
Add finished indication to process buffer.
...
* magit.el (magit-process-sentinel): Simplified. Add event to process buffer.
2008-08-21 02:34:05 +03:00
Marius Vollmer
d4aacdbd73
* magit.el (magit-write-hunk-item-patch): Corrected 'info' argument to 'item'.
...
Damn dynamic scope covered this up for us.
2008-08-21 02:25:57 +03:00
Marius Vollmer
23bdc84c46
Removed magit-diff-or-hunk-item-position.
2008-08-21 02:23:08 +03:00
Marius Vollmer
51c54a329e
Replaced horrible magit-info with nice Item abstraction.
2008-08-21 02:19:58 +03:00
Marius Vollmer
e54ab875e3
Use quit-window instead of magit-quit.
...
Thanks to Phil Hagelberg!
2008-08-21 00:29:50 +03:00
Marius Vollmer
022463442b
Bind magit-unstage-all to 'U'.
...
* magit.el (magit-unstage-all): New.
2008-08-21 00:19:15 +03:00
Marius Vollmer
151ae0a8a3
Redone key bindings for pulling, leaving 'U' free for unstage-all.
2008-08-21 00:18:04 +03:00
Marius Vollmer
52f61d6107
Better defaults for 'x'.
...
* magit.el (magit-reset-head): Default to "HEAD^" when there is no
commit at point.
2008-08-20 23:57:51 +03:00
Marius Vollmer
822adda331
Omit empty sections.
...
* magit.el (magit-insert-section): Insert final newline only when
inserted output is not empty. Delete title when it is.
2008-08-20 23:57:07 +03:00
Marius Vollmer
cb3b44282d
Bind 'q' to magit-quit.
2008-08-20 01:21:50 +03:00
Marius Vollmer
5421e52262
Fix untracked files.
...
* magit.el (magit-wash-other-files): Skip empty lines.
2008-08-20 01:05:21 +03:00
Marius Vollmer
4c9659405b
Hightlight current item.
...
* magit.el (magit-put-line-property): Don't use line-end-position, use
line-beginning-position of next line instead.
2008-08-20 00:58:34 +03:00
Marius Vollmer
b1a3cf9a07
Remove outdated comment.
2008-08-20 00:56:11 +03:00
Marius Vollmer
9189074037
Removed "-face" suffix from face names.
...
As recommended by the Elisp Manual.
2008-08-20 00:55:42 +03:00
Marius Vollmer
e227560477
Faces.
...
From Linh Dang.
2008-08-19 23:43:34 +03:00
Marius Vollmer
79239e3ae2
Updated TODO.
2008-08-19 02:06:17 +03:00
Marius Vollmer
5e6ac7730e
Move with n and p, like God intended.
...
* magit.el (magit-mode-map): Put magit-next-section and
magit-previous-section on 'n' and 'p', respectively. Put
magit-display-process on '$'.
2008-08-19 02:06:08 +03:00
Marius Vollmer
a72d0ceec1
Added lost key bindings.
...
* magit.el (magit-mode-map): Added bindings for 'a' magit-apply-commit
and 'v' magit-revert-commit.
2008-08-19 01:34:38 +03:00
Marius Vollmer
601d26bf5a
Use named functions for the section jumpers so that the online help
...
has something to show.
2008-08-19 00:42:44 +03:00
Marius Vollmer
4b3fcac93f
Better movement.
...
* magit.el (magit-next-section, magit-previous-section,
magit-section-jumper): New.
(magit-put-line-property): Include newline.
(magit-mode-map): Don't bind digits by default. Bind M-n and M-p to
move by sections, and 0, 1, 2, 4 to jump directly to a section
2008-08-18 23:51:26 +03:00
Marius Vollmer
5a19dcbd8d
Removed docstring of magit-mode, it's quite wrong now.
2008-08-18 23:13:16 +03:00
Marius Vollmer
b7c1292701
Always use "git cmd" instead of "git-cmd".
...
The latter was deprecated and doesn't work anymore in git 1.6.
2008-08-18 22:07:00 +03:00
Marius Vollmer
edc4aa78d9
Provide promised default for magit-reset-head.
2008-08-17 02:59:50 +03:00
Marius Vollmer
d530079be5
Remove magit-log-commit.
2008-08-17 02:55:41 +03:00
Marius Vollmer
a88933a1d2
Typo (aka incomplete refactoring).
...
* magit.el (magit-automatic-merge): Use rev instead of branch, stupid.
2008-08-17 02:54:44 +03:00
Marius Vollmer
72819bd451
Make 'd' diff against working tree, not HEAD.
...
* magit.el (magit-diff-head, magit-diff-working-tree): Renamed former
to latter. Use single revision when calling magit-diff.
2008-08-17 02:38:37 +03:00
Marius Vollmer
bf1c66ce5c
Don't be too clever when showing default revisions.
...
* magit.el (magit-read-rev): Do not use magit-rev-describe when
formatting the default value for the prompt. This is misleading since
it might use names of branches etc while in reality we are might be
offering a raw commit.
2008-08-17 02:38:36 +03:00
Marius Vollmer
6a0b8c83e4
Declare submodes of buffer, now that all of them are in magit-mode.
...
* magit.el (magit-mode-init): New.
(magit-status, magit-diff, magit-log): Use it.
(magit-find-buffer, magit-find-status-buffer): Look at magit-submode.
2008-08-17 02:38:36 +03:00
Marius Vollmer
8b481fb716
Removed magit-checkout-commit.
2008-08-17 02:38:36 +03:00
Marius Vollmer
e82f5da831
Show default when asking for a revision.
...
* magit.el (magit-read-rev): Include default in prompt. Updated all
callers to new prompt rules..
(magit-checkout): Use magit-default-rev interactively.
2008-08-17 02:38:36 +03:00
Marius Vollmer
b74bb2d2d9
General defaulting for revisions.
...
* magit.el (magit-commit-at-point): Added option nil-ok-p argument.
(magit-default-rev): New.
2008-08-17 02:38:36 +03:00
Marius Vollmer
3c9bf0a0f2
Make magit-reset-working-tree interactive.
...
* magit.el (magit-reset-working-tree): Add 'interactive' form.
2008-08-17 02:38:36 +03:00
Marius Vollmer
7d0da4a5bd
Redone diffing, logging, and resetting.
...
Provide generic support for revisions and ranges of revisions as
arguments to interactive functions.
2008-08-17 02:38:36 +03:00
Marius Vollmer
5072939384
* magit.el (magit-update-status): Bring back Unpushed commit.
2008-08-17 02:38:36 +03:00
Marius Vollmer
b4efebca2f
Remove magit-log-mode, use generic magit-mode instead.
...
* magit.el (magit-mode): Truncate lines.
2008-08-17 02:38:36 +03:00
Marius Vollmer
48386c915c
Unified keymaps, make resetting use the commit at point instead of
...
asking, changed Unpushed commits to Recent commits.
2008-08-17 02:38:36 +03:00
Marius Vollmer
d8184590ca
Updated TODO
2008-08-17 02:38:36 +03:00
Marius Vollmer
25b62f6f05
Make it work with Emacs 22.
...
* magit.el (magit-hunk-is-conflict-p): Use looking-at instead of
looking-at-p, which is only available in Emacs 23.
2008-08-15 21:33:17 +03:00
Marius Vollmer
4b2dd0f262
Allow diffing with the mark in the status buffer.
...
* magit.el (magit-mode-map): Bind magit-diff-with-mark to '='.
2008-08-14 01:50:50 +03:00
Marius Vollmer
62b5fd8fc1
Doc updates.
2008-08-14 01:07:44 +03:00
Marius Vollmer
a0dc20dc52
Show running command in the mode line.
...
* magit.el (magit-set-mode-line-process): New.
(magit-run, magit-process-sentinel): Use it.
(magit-mode): Initialiaze magit-line-process, for documentation purposes.
2008-08-13 17:27:31 +03:00
Marius Vollmer
98c6d4ff90
Avoid setting the mark when updating the status buffer.
...
* magit.el (magit-goto-line): New.
(magit-update-status): Use it.
2008-08-13 17:25:32 +03:00
Marius Vollmer
231c4ba164
Only ignore files in the current directory, not in subdirectories.
...
* magit.el (magit-ignore-thing-at-point): Prefix .gitignore line with
"/" so that it only matches in current directory.
2008-08-13 07:32:04 +03:00
Marius Vollmer
555377edcc
Silence byte compiler. Added skeleton Makefile.
2008-08-13 06:14:53 +03:00
Marius Vollmer
e8cc5fdf1b
Updated manual menus.
2008-08-13 05:35:43 +03:00
Marius Vollmer
22ee4f7685
Rebasing.
2008-08-13 05:28:16 +03:00
Marius Vollmer
e19bea5bf1
Define keymaps the right way.
2008-08-13 00:33:31 +03:00
Marius Vollmer
ff389d33be
Use 's' for staging, not 'a'.
2008-08-13 00:01:10 +03:00
Marius Vollmer
fc723bcef6
Updated TODO.
2008-08-12 17:39:44 +03:00
Marius Vollmer
659480b4e3
* magit.el (magit-read-top-dir): Also ask when top-dir can't be found.
2008-08-12 13:52:16 +03:00
Marius Vollmer
343382cdae
Added empty manual.
2008-08-12 04:41:14 +03:00
Marius Vollmer
08de8c72b1
Added README, AUTHORS, and NEWS.
2008-08-12 04:31:07 +03:00
Marius Vollmer
0ef2ee3dd8
Be more flexible with the diffing.
...
* magit.el (magit-show-diff): Accept variable number of arguments.
Updated callers.
2008-08-12 03:18:04 +03:00
Marius Vollmer
8c4b0f9184
Diffing with branches.
...
* magit.el (magit-diff-with-branch): New.
2008-08-12 03:14:54 +03:00
Marius Vollmer
087e1b47bc
Maintain a marked object and diff against it from the log buffer.
2008-08-12 02:42:13 +03:00
Marius Vollmer
b59f9d9841
More robust diff washing.
...
* magit.el (magit-wash-diff): Don't try to get the prefix from
non-accessible parts of the buffer.
2008-08-12 00:28:28 +03:00
Marius Vollmer
55afcba382
Visit commits by showing their details.
...
* magit.el (magit-visit-thing-at-point): Handle 'commit' infos.
2008-08-12 00:22:01 +03:00
Marius Vollmer
175c816cf2
Show unpushed changes as graph.
...
* magit.el (magit-update-status): Add "--graph" to git-log arguments.
2008-08-12 00:21:15 +03:00
Marius Vollmer
3d2316835a
Show log instead of diffstat for unpushed changes.
...
* magit.el (magit-update-status): Use git-log and wash the output.
2008-08-12 00:16:15 +03:00
Marius Vollmer
1fab257814
Allow free form entry of branches, tags, etc.
...
* magit.el (magit-read-other-branch, magit-read-rev): Renamed former
to latter. Do not require a match. Changed all callers.
2008-08-12 00:08:45 +03:00
Marius Vollmer
7d31c70a26
Merge from devel.
...
* magit.el (magit-stage-thing-at-point): Improve docstring.
2008-08-11 22:44:41 +03:00
Marius Vollmer
3c91c2d7af
More docs.
...
* magit.el (magit-stage-thing-at-point, magit-unstage-thing-at-point):
Added correct docstrings.
2008-08-11 22:37:26 +03:00
Marius Vollmer
75b2ce7977
More docs.
...
* magit.el (magit-unstage-thing-at-point): Added docstring.
2008-08-11 22:34:35 +03:00
Marius Vollmer
ba206d1862
More docs.
2008-08-11 22:31:21 +03:00
Marius Vollmer
f88fd14590
Updated TODO
2008-08-11 22:28:05 +03:00
Marius Vollmer
69101a1115
Even more documentation.
...
* magit.el (magit-show-commit): Added docstring.
2008-08-11 22:26:04 +03:00
Marius Vollmer
22287217df
More documentation.
...
* magit.el (magit-quit): Add docstring.
2008-08-11 22:25:43 +03:00
Marius Vollmer
e6ba8fdf31
Show combined diffs with git-log.
...
* magit.el (magit-show-commit): Add "--cc" to git-log invocation.
2008-08-11 19:17:47 +03:00
Marius Vollmer
fc3286ffa0
Merge dev, document magit-log-mode.
2008-08-11 19:12:32 +03:00
Marius Vollmer
47d9520d42
History browsing improvements.
...
* magit.el (magit-show-commit): Make sure we use the right directory.
(magit-wash-log): Deal with the commit SHA1 not being at the beginning
of the line.
(magit-browse-log): Add "--graph" for extra niceness.
(magit-log-commit): New.
2008-08-11 18:32:07 +03:00
Marius Vollmer
0b3118061d
Add HEAD info to status buffer.
2008-08-11 15:46:17 +03:00
Marius Vollmer
a63fbfa2ce
Checking out of commits.
2008-08-11 15:42:23 +03:00
Marius Vollmer
3aa3f478e9
Updated TODO.
2008-08-11 06:00:55 +03:00
Marius Vollmer
a5b4bcd354
Renamed *git-process* buffer to *magit-process*.
2008-08-11 05:42:07 +03:00
Marius Vollmer
133e40b90b
Make *magit-commit* buffer read-only.
2008-08-11 05:41:28 +03:00
Marius Vollmer
2e07984097
Actually pass the head to git-log.
2008-08-11 05:18:55 +03:00
Marius Vollmer
5742fa3476
Branch browsing.
2008-08-11 05:16:43 +03:00
Marius Vollmer
eb62d6d59f
Initial support for history browsing.
2008-08-11 05:10:10 +03:00
Marius Vollmer
16eb6acc95
Support for add-change-log-entry kind of functionality.
...
* magit.el (magit-add-log): New, bind it to `C'.
2008-08-11 03:23:54 +03:00
Marius Vollmer
2f5d41a8ac
Be more accurate when visiting via hunks.
...
* magit.el (magit-hunk-target-line): New.
(magit-visit-thing-at-point): Use it.
2008-08-11 03:22:50 +03:00
Marius Vollmer
036448e1b8
Add section markers to washed output and try to preserve position when
...
updating status buffer.
2008-08-11 01:28:35 +03:00
Marius Vollmer
db13d0c863
Be more verbose.
2008-08-08 19:01:24 +03:00
Marius Vollmer
bd27dcd948
Updated.
2008-08-07 03:03:26 +03:00
Marius Vollmer
8625e157af
Docs and hooks.
2008-08-07 03:02:45 +03:00
Marius Vollmer
6801bef645
Mode-ify magit-mode and allow multiple status buffers to exist.
2008-08-07 01:49:35 +03:00
Marius Vollmer
7a3e2bdf2c
Correctly reset state when starting a new hunk.
2008-08-06 15:51:09 +03:00
Marius Vollmer
abb3b6880c
Updated.
2008-08-06 15:49:51 +03:00
Marius Vollmer
66d50d8466
Describe things at point.
2008-08-06 15:48:55 +03:00
Marius Vollmer
adfb76c91d
Soft resetting.
2008-08-06 14:48:03 +03:00
Marius Vollmer
e9132a53d4
Resetting.
2008-08-06 14:41:48 +03:00
Marius Vollmer
c55f27dadd
Show merge heads in status and don't insert MERGE_MSG in log-edit buffer.
2008-08-06 04:18:41 +03:00
Marius Vollmer
c4afadff2e
Omit last empty element in shell-lines.
...
New file-lines function.
2008-08-06 04:13:40 +03:00
Marius Vollmer
7ce74c2879
Didn't know about split-string...
2008-08-06 03:47:42 +03:00
Marius Vollmer
45f8fa9763
Updated.
2008-08-06 03:47:26 +03:00
Marius Vollmer
25ee763f82
Moved things around a bit.
2008-08-06 03:22:22 +03:00
Marius Vollmer
86157f2586
Don't wash the --stat output.
2008-08-06 03:22:01 +03:00
Marius Vollmer
e448d4f214
Updated
2008-08-06 02:44:41 +03:00
Marius Vollmer
5baf4ddf71
Renamed to magit.
2008-08-06 02:41:05 +03:00
Marius Vollmer
3cb3b56759
Renamed.
2008-08-06 02:38:46 +03:00