aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/emacs
AgeCommit message (Collapse)AuthorFilesLines
2018-04-16git{,-blame}.el: remove old bitrotting Emacs codeÆvar Arnfjörð Bjarmason5-2228/+25
The git-blame.el mode has been superseded by Emacs's own vc-annotate (invoked by C-x v g). Users of the git.el mode are now much better off using either Magit or the Git backend for Emacs's own VC mode. These modes were added over 10 years ago when Emacs's own Git support was much less mature, and there weren't other mature modes in the wild or shipped with Emacs itself. These days these modes have few if any users, and users of git aren't well served by us shipping these (some OS's install them alongside git by default, which is confusing and leads users astray). So let's remove these per Alexandre Julliard's message to the ML[1]. If someone still wants these for some reason they're better served by hosting these elsewhere (e.g. on ELPA), instead of us distributing them with git. However, since downstream packagers such as Debian are packaging this as git-el it's less disruptive to still carry these files as Elisp code that'll error out with a message suggesting alternatives, rather than drop the files entirely[2]. Then rather than receive a cryptic load error when they upgrade existing users will get an error directing them to the README file, or to just stop requiring these modes. I think it makes sense to link to GitHub's hosting of contrib/emacs/README (which'll be updated by the time users see this) so they don't have to hunt down the packaged README on their local system. 1. "Re: [PATCH] git.el: handle default excludesfile properly" (87muzlwhb0.fsf@winehq.org) -- https://public-inbox.org/git/87muzlwhb0.fsf@winehq.org/ 2. "Re: [PATCH v3] git{,-blame}.el: remove old bitrotting Emacs code" (20180327165751.GA4343@aiede.svl.corp.google.com) -- https://public-inbox.org/git/20180327165751.GA4343@aiede.svl.corp.google.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-09Replace Free Software Foundation address in license noticesTodd Zullinger2-6/+4
The mailing address for the FSF has changed over the years. Rather than updating the address across all files, refer readers to gnu.org, as the GNU GPL documentation now suggests for license notices. The mailing address is retained in the full license files (COPYING and LGPL-2.1). The old address is still present in t/diff-lib/COPYING. This is intentional, as the file is used in tests and the contents are not expected to change. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26emacs: make 'git-status' work with separate git dirsEnrico Scholz1-1/+1
when trying 'M-x git-status' in a submodule created with recent (1.7.5+) git, the command fails with | ... is not a git working tree This is caused by creating submodules with '--separate-git-dir' but still checking for a working tree by testing for a '.git' directory. The patch fixes this by relaxing the existing detection a little bit. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25Merge branch 'lm/git-blame-el'Junio C Hamano1-36/+37
eLisp fixes for a contrib/ script. * lm/git-blame-el: git-blame.el: Do not use bare 0 to mean (point-min) git-blame.el: Use with-current-buffer where appropriate git-blame.el: Do not use goto-line in lisp code
2012-06-14git-blame.el: Do not use bare 0 to mean (point-min)Lawrence Mitchell1-1/+1
Signed-off-by: Lawrence Mitchell <wence@gmx.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-14git-blame.el: Use with-current-buffer where appropriateLawrence Mitchell1-37/+37
In git-blame-filter and git-blame-create-overlay we want to save (along with the values of point and mark) the current-buffer in scope when calling the functions. The idiom (save-excursion (set-buffer buf) ...) will correctly restore the correct buffer, but will not save the values of point and mark in buf (only in the buffer current when the save-excursion call is executed). The intention of these functions is to save the current buffer from the calling scope and the values of point and mark in the buffer they are modifying. The correct idiom for this is (with-current-buffer buf (save-excursion ...)) Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de> Signed-off-by: Lawrence Mitchell <wence@gmx.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-14git-blame.el: Do not use goto-line in lisp codeRüdiger Sonderfeld1-1/+2
goto-line is a user-level command, instead use the lisp-level construct recommended in Emacs documentation. Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de> Signed-off-by: Lawrence Mitchell <wence@gmx.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-10git-blame.el: use mapc instead of mapcarRüdiger Sonderfeld1-1/+1
Using mapcar here is a waste of memory because the mapped result is not used. Noticed by emacs ("Warning: `mapcar' called for effect"). [jn: split from a larger patch, with new description] Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03git.el: Don't use font-lock-compile-keywordsLawrence Mitchell1-3/+10
If font-lock is disabled, font-lock-compile-keywords complains. Really what we want to do is to replace log-edit's font-lock definitions with our own, so define a major mode deriving from log-edit and set up font-lock-defaults there. We then use the optional MODE argument to log-edit to set up the major mode of the commit buffer appropriately. Signed-off-by: Lawrence Mitchell <wence@gmx.li> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03git-blame.el: Add (require 'format-spec)David Kågedal1-0/+1
c5022f57 (git-blame.el: Change how blame information is shown, 2009-09-29) taught the "M-x git-blame" mode to format its output in a more interesting way, making use of the format-spec function. format-spec is included in Emacs 23 and is a useful function. Older emacsen can get it from Gnus. In all emacsen, we need to 'require it before use to avoid warnings: git-blame.el:483:1:Warning: the function `format-spec' is not known to be defined. Reported-by: Sergei Organov <osv@javad.com> Reported-by: Kevin Ryde <user42@zip.com.au> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-29git-blame.el: Change how blame information is shown.David Kågedal1-54/+102
It is more customizable, and uses a line prefix to show the commit. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-09git.el: Use git-add-file for unmerged files, remove git-resolve-fileMartin Nordholts1-12/+1
Use `git-add-file' to mark unmerged files as resolved in the *git-status* buffer to be consistent with git's CLI instructions. Also remove `git-resolve-file' to make it clear that that "R" is a now a free keybinding. Signed-off-by: Martin Nordholts <martinn@src.gnome.org> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-06git.el: Clarify documentation of git-commit-treeDavid Kågedal1-5/+8
Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-21Add a README in the contrib/emacs directory.Alexandre Julliard1-0/+39
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-21git.el: Improve the confirmation message on remove and revert.Alexandre Julliard1-2/+6
If there's only one file, print its name instead of just "1 file". Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-21git.el: Make sure that file lists are sorted as they are created.Alexandre Julliard1-13/+16
This avoids a possibly redundant sort in git-update-status-files and git-status-filenames-map, and allows callers to continue using the list without having to copy it. It also fixes the confusing success messages reported by Brent Goodrick. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07emacs: Remove the no longer maintained vc-git package.Alexandre Julliard2-217/+1
vc-git is distributed with Emacs since version 22.2, and is maintained in the Emacs CVS tree. This file is obsolete and causes trouble for people who want to add contrib/emacs to their load-path. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add some notes about Emacs versions compatibility.Alexandre Julliard1-2/+10
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Use integer instead of character constants in case statement.Alexandre Julliard1-15/+15
This is for compatibility with XEmacs. Reported by Vassili Karpov. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Set a regexp for paragraph-separate in log-edit mode.Alexandre Julliard1-0/+1
This allows using fill-paragraph on the log message without interference from the various header fields. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Make git-run-command-region display the error if any.Alexandre Julliard1-19/+19
This makes it easier to figure out why a commit has failed. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add commands for cherry-pick and revert.Alexandre Julliard1-0/+42
Support for cherry-picking and reverting commits, with automatic formatting of the commit log message. Bound to C-c C-p and C-c C-v respectively. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add a command to create a new branch.Alexandre Julliard1-0/+14
Prompts for a branch name, create a new branch at HEAD and switch to it. Bound to C-c C-b by default. Based on a patch by Rémi Vanicat <vanicat@debian.org>. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add a checkout command.Alexandre Julliard1-2/+31
Prompts for a branch name and checks it out. Bound to C-c C-o by default. Based on a patch by Rémi Vanicat <vanicat@debian.org>. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-23git.el: Allow to commit even if there are no marked files.Alexandre Julliard1-23/+20
This can be useful to commit a merge that didn't result in any changes. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-23git.el: Add possibility to mark files directly in git-update-status-files.Alexandre Julliard1-5/+3
This avoids the need to go through the list twice, which helps performance on large file lists. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-23git.el: Add an insert file command.Alexandre Julliard1-0/+7
This allows to insert a file in the buffer no matter what its state is, making it possible for instance to remove an up-to-date file. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21git.el: Never clear the status buffer, only update the files.Alexandre Julliard1-84/+85
This makes it unnecessary to save/restore the file marks. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21git.el: Fix git-amend-commit to support amending an initial commit.Alexandre Julliard1-3/+7
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21git.el: Properly handle merge commits in git-amend-commit.Alexandre Julliard1-8/+9
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21git.el: Simplify handling of merge heads in the commit log-edit buffer.Alexandre Julliard1-8/+7
Use a single Merge: header instead of one Parent: header for each parent, and don't list the current HEAD as a merged head. Support symbolic references too. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21git.el: Remove the env parameter in git-call-process and ↵Alexandre Julliard1-28/+26
git-call-process-string. All callers that need to change the environment now set process-environment themselves. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21git.el: Improve error handling for commits.Alexandre Julliard1-17/+29
Display all errors happening in the various subcommands of the commit sequence, and abort on any error. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-07-21Don't cut off last character of commit descriptions.Nikolaj Schumacher1-1/+1
This should have been part of 24a2293 (git-blame.el: show the when, who and what in the minibuffer., 2008-02-12), that changed from using --pretty=oneline to --pretty=format:... without terminating newline. Acked-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21Rename .git/rebase to .git/rebase-applyJohannes Schindelin1-4/+4
With git-am, it sounds awkward to have the patches in ".git/rebase/", but for technical reasons, we have to keep the same directory name for git-am and git-rebase. ".git/rebase-apply" seems to be a good compromise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-15Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"Johannes Schindelin1-4/+4
Since the files generated and used during a rebase are never to be tracked, they should live in $GIT_DIR. While at it, avoid the rather meaningless term "dotest" to "rebase", and unhide ".dotest-merge". This was wished for on the mailing list, but so far unimplemented. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-02Revert "git.el: Set process-environment instead of invoking env"Karl Hasselström1-4/+7
This reverts commit dbe48256b41c1e94d81f2458d7e84b1fdcb47026, which caused mis-encoding of non-ASCII author/committer names when the git-status mode is used to create commits. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-21git.el: Set process-environment instead of invoking envClifford Caoile1-7/+4
According to the similar patch from David Kågedal [1], "this will make it a little less posix-dependent and more efficient." However, there are two other areas that need to replaced, namely git-run-command-region and git-run-hooks. This patch implements the changes of [1] onto those Emacs Lisp functions. If unpatched, using the git port "msysgit" on Windows will require defadvice changes as shown at [2] (also explained at 4msysgit.git [3]). I have tested git-run-command-region on msysgit, because this is always called by git-commit (via git-commit-tree <- git-do-commit <- git-commit-file). However, I could not test git-run-hooks because it currently does not work on the Emacs Windows port. The latter reports the hooks files as a+rw and a-x, despite msysgit and cygwin chmod setting on the respective files. References: [1] f27e55864317611385be4d33b3c53ca787379df9 [2] http://groups.google.com/group/msysgit/browse_thread/thread/b852fef689817707 [3] http://repo.or.cz/w/git/mingw/4msysgit.git?a=commit;h=3c30e5e87358eba7b6d7dcd6301ae8438f0c30ea Signed-off-by: Clifford Caoile <piyo@users.sourceforge.net> Acked-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05specify explicit "--pretty=medium" with `git log/show/whatchanged`Denis Cheng1-1/+1
The following patch will introduce a new configuration variable, "format.pretty", from then on the pretty format without specifying "--pretty" might not be the default "--pretty=medium", it depends on the user's config. So all kinds of Shell/Perl/Emacs scripts that needs the default medium pretty format must specify it explicitly. Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29Merge branch 'maint'Junio C Hamano1-1/+1
* maint: Documentation cherry-pick: Fix cut-and-paste error git.el: find the git-status buffer whatever its name is git-gui: Paper bag fix info dialog when no files are staged at commit
2008-02-29git.el: find the git-status buffer whatever its name isRémi Vanicat1-1/+1
git-status used the buffer name to find git-status buffers, and that can fail if the buffer has another name, for example when multiple working directories is tracked. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Acked-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Xavier Maillard <xma@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27git.el: Do not display empty directories.Alexandre Julliard1-1/+1
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20git.el: Set process-environment instead of invoking envDavid Kågedal1-4/+3
This will make it a little less posix-dependent, and more efficient. Included is also a minor doc improvement. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11git-blame.el: show the when, who and what in the minibuffer.Junichi Uekawa1-1/+9
Change the default operation to show 'when (day the commit was made), who (who made the commit), what (what the commit log was)' in the minibuffer instead of SHA1 and title of the commit log. Since the user may prefer other displaying options, it is made as a user-configurable option. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Better handling of subprocess errors.Alexandre Julliard1-37/+51
Where possible, capture the output of the git command and display it if the command fails. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Check for existing buffers on revert.Alexandre Julliard1-0/+8
Refuse to revert a file if it is modified in an existing buffer but not saved. On success, revert the buffers that contains the files that have been reverted. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Added a command to amend a commit.Alexandre Julliard1-1/+73
It reverts the commit and sets up the status and edit log buffer to allow making changes and recommitting it. Bound to C-c C-a. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Support for showing unknown/ignored directories.Alexandre Julliard1-9/+29
Instead of recursing into directories that only contain unknown files, display only the directory itself. Its contents can be expanded with git-find-file (bound to C-m). Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-08git.el: Make status refresh faster.Alexandre Julliard1-11/+13
Don't set the needs-refresh flag when inserting a new file info, since ewoc refreshes it upon insert already; this makes a full refresh twice as fast. Also make git-fileinfo-prettyprint a little faster by not retrieving permission values twice. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-08git.el: Refresh files from their real state upon commit.Alexandre Julliard1-10/+12
Instead of just setting the state to up-to-date, retrieve the full state again, so that the file type can be displayed properly. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-08git.el: Make sure we never insert the same file twice.Alexandre Julliard1-3/+3
Skip non-zero stage files during git-ls-files -c, they are handled later. Also fix git-insert-info-list to merge duplicate file names. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06git.el: Display file types and type changes.Alexandre Julliard1-3/+31
Handle the T status from git-diff-index to display type changes between file/symlink/subproject. Also always show the file type for symlink and subprojects to indicate that they are not normal files. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06git.el: Retrieve the permissions for up-to-date files.Alexandre Julliard1-2/+18
This allows displaying correctly the executable flag for the initial commit, and will make it possible to show the file type for up-to-date symlinks and subprojects. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06git.el: Support for getting diffs from inside the log-edit buffer.Alexandre Julliard1-2/+12
Take advantage of the new log-edit feature that allows to show a diff with C-c C-d while editing the log message. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-11git.el: Added a menu for git-status-mode.Alexandre Julliard1-1/+42
Originally written by Rémi Vanicat, I just changed the layout a little. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-28git.el: Run git-gc --auto after commits.Alexandre Julliard1-0/+1
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-28git.el: Refresh only the changed file marks when marking/unmarking all.Alexandre Julliard1-2/+5
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-28git.el: Fix typo in git-update-saved-file error handling.Alexandre Julliard1-1/+1
Spotted by Matthieu Lemerre. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-28git.el: Fix typo in "Reverted file" message.Alexandre Julliard1-1/+1
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Reset the permission flags when changing a file state.Alexandre Julliard1-17/+11
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Update a file status in the git buffer upon save.Alexandre Julliard1-2/+16
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Do not print a status message on every git command.Alexandre Julliard1-29/+41
Instead print a single message around sequences of commands that can potentially take some time. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Preserve file marks when doing a full refresh.Alexandre Julliard1-12/+28
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-13git.el: Allow the add and remove commands to be applied to ignored files.Alexandre Julliard1-2/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-13git.el: Allow selecting whether to display uptodate/unknown/ignored files.Alexandre Julliard1-15/+77
The default behavior for each state can be customized, and it can also be toggled directly from the status buffer. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-13git.el: Keep the status buffer sorted by filename.Alexandre Julliard1-38/+65
This makes insertions and updates much more efficient. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29git.el: Added colors for dark backgroundDavid Kågedal1-9/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-22git.el: Avoid a lisp error when there's no current branch (detached HEAD).Alexandre Julliard1-3/+5
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-13git.el: Always set the current directory in the git-diff buffer.Alexandre Julliard1-4/+6
This allows jumping to the correct file with the diff-mode commands. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-13git.el: Add support for interactive diffs.Alexandre Julliard1-1/+7
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31git.el: Take into account the core.excludesfile config option.Alexandre Julliard1-5/+15
Also don't require .git/info/exclude to exist in order to list unknown files. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Acked-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31git.el: Avoid using ewoc-set-data for compatibility with Emacs 21.Alexandre Julliard1-1/+1
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Acked-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-25git.el: Pass an explicit argument to enable smerge-mode.Alexandre Julliard1-1/+1
Without argument the mode is toggled, which would do the wrong thing if the file was already open. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-24git.el: Support for incremental status updates.Alexandre Julliard1-111/+113
When we know which files have been modified, we can now run diff-index or ls-files with a file list to refresh only the specified files instead of the whole project. This also allows proper refreshing of files upon add/delete/resolve, instead of making assumptions about the new file state. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-15contrib/emacs/Makefile: Also install .el files.David Kastrup1-1/+1
Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-14Use $(RM) in Makefiles instead of 'rm -f'Emil Medve1-1/+2
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-12Add missing functions to contrib/emacs/vc-git.elDavid Kastrup1-0/+65
This is necessary to make several editing functions work, like C-u C-x v = Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Enable "git rerere" by the config variable rerere.enabledJohannes Schindelin1-2/+1
Earlier, "git rerere" was enabled by creating the directory .git/rr-cache. That is definitely not in line with most other features, which are enabled by a config variable. So, check the config variable "rerere.enabled". If it is set to "false" explicitely, do not activate rerere, even if .git/rr-cache exists. This should help when you want to disable rerere temporarily. If "rerere.enabled" is not set at all, fall back to detection of the directory .git/rr-cache. [jc: with minimum tweaks] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-04-19git.el: Add a commit description to the reflog.Alexandre Julliard1-14/+28
Add a description of the commit to the reflog using the first line of the log message, the same way the git-commit script does it. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-05Merge branch 'maint'Junio C Hamano1-2/+2
* maint: Fix lseek(2) calls with args 2 and 3 swapped Honor -p<n> when applying git diffs Fix dependency of common-cmds.h Fix renaming branch without config file DESTDIR support for git/contrib/emacs gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Document --left-right option to rev-list. Revert "builtin-archive: use RUN_SETUP" rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email. rerere: make sorting really stable. Fix t4200-rerere for white-space from "wc -l"
2007-04-05DESTDIR support for git/contrib/emacsVille Skyttä1-2/+2
make install DESTDIR=... support for git/contrib/emacs Signed-off-by: Ville Skyttä <scop@xemacs.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-31git-blame.el: pick a set of random colors for each git-blame turnXavier Maillard1-28/+55
I thought it would be cool to have different set of colors for each git-blame-mode. Function `git-blame-new-commit' does this for us picking when possible, a random colors based on the set we build on startup. When it fails, `git-blame-ancient-color' will be used. We also take care not to use the same color more than once (thank you David Kågedal, really). * Prevent (future possible) namespace clash by renaming `color-scale' into `git-blame-color-scale'. Definition has been changed to be more in the "lisp" way (thanks for help to #emacs). Also added a small description of what it does. * Added docstrings at some point and instructed defvar when a variable was candidate to customisation by users. * Added missing defvar to silent byte-compilers (git-blame-file, git-blame-current) * Do not require 'cl at startup * Added more informations on compatibility Signed-off-by: Xavier Maillard <zedek@gnu.org> Acked-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-31git-blame.el: separate git-blame-mode to ease maintenanceXavier Maillard1-18/+37
git-blame-mode has been splitted into git-blame-mode-on and git-blame-mode-off; it now conditionnaly calls one of them depending of how we call it. Code is now easier to maintain and to understand. Fixed `git-reblame' function: interactive form was at the wrong place. String displayed on the mode line is now configurable through `git-blame-mode-line-string` (default to " blame"). Signed-off-by: Xavier Maillard <zedek@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27git.el: Display some information about the HEAD commit.Alexandre Julliard1-2/+20
Use git-log --pretty=oneline to print a short description of the current HEAD (and merge heads if any) in the buffer header. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-19git.el: Add support for commit hooks.Alexandre Julliard1-24/+57
Run the pre-commit and post-commit hooks at appropriate places, and display their output if any. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10Merge branch 'maint'Junio C Hamano1-24/+65
* maint: git.el: Retrieve commit log information from .dotest directory. git.el: Avoid appending a signoff line that is already present. setup_git_directory_gently: fix off-by-one error user-manual: install user manual stylesheet with other web documents user-manual: fix rendering of history diagrams user-manual: fix missing colon in git-show example user-manual: fix inconsistent use of pull and merge user-manual: fix inconsistent example glossary: fix overoptimistic automatic linking of defined terms Documentation: s/seperator/separator/ Adjust reflog filemode in shared repository
2007-03-10git.el: Retrieve commit log information from .dotest directory.Alexandre Julliard1-24/+53
If a git-am or git-rebase is in progress, fill the commit log buffer from the commit information found in the various files in the .dotest directory. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10git.el: Avoid appending a signoff line that is already present.Alexandre Julliard1-6/+18
Also avoid inserting an extra newline if other signoff lines are present. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05contrib/emacs: Use non-interactive function to byte-compile filesXavier Maillard1-2/+2
Add git-blame as a candidate to the byte-compilation. batch-byte-compile is the prefered way to byte-compile files in batch mode. Use it instead of the interactive function. Signed-off-by: Xavier Maillard <zedek@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-28git.el: Set the default commit coding system from the repository config.Alexandre Julliard1-6/+18
If not otherwise specified, take the default coding system for commits from the 'i18n.commitencoding' repository configuration value. Also set the buffer-file-coding-system variable in the log buffer to make the selected coding system visible on the modeline. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09git-blame.el: Autoupdate while editingDavid Kågedal1-9/+86
This adds the support for automatically updating the buffer while editing. A configuration variable git-blame-autoupdate controls whether this should be enabled or not. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09git-blame.el: Doc fixes and cleanupDavid Kågedal1-4/+10
Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09git-blame.el: blame unsaved changesDavid Kågedal1-21/+44
Make git-blame use the current buffer contents for the blame, instead of the saved file. This makes the blame correct even if there are unsaved changes. Also added a git-reblame command. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09git-blame.el: improve color handlingDavid Kågedal1-14/+10
Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09Handle uncommitted changes and cache descriptionsDavid Kågedal1-6/+20
Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09git-blame: Change installation instructionsJakub Narebski1-4/+19
Change installation instructions to using either "(require 'git-blame)" or appropriate autoload instruction in GNU Emacs init file, .emacs This required adding "(provide 'git-blame)" at the end of git-blame.el and adding [preliminary] docstring to `git-blame-mode' function for consistency (to mark function as interactive in `autoload' we have to provide docstring as DOCSTRING is third arg, and INTERACTIVE fourth, and both are optional). `git-blame-mode' is marked to autoload. While at it ensure that we add `git-blame-mode' to `minor-mode-alist' only once (in a way that does not depend on `cl' package). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09git-blame: Add Emacs Lisp file headers and GNU GPL boilerplateJakub Narebski1-3/+72
Add Emacs Lisp file headers, according to "Coding Conventions" chapter in Emacs Lisp Reference Manual and Elisp Area Convetions for EmacsWiki: http://www.emacswiki.org/cgi-bin/wiki/ElispAreaConventions Those include: copyright notice, GNU GPL boilerplate, description and instalation instructions as provided in email and in commit message introducing git-blame.el, compatibility notes from another email by David Kågedal about what to change to use it in GNU Emacs 20, and "git-blame ends here" to detect if file was truncated. First line includes setting file encoding via first line local variable values (file variables). Added comment to "(require 'cl)" to note why it is needed; "Coding Conventions" advises to avoid require the `cl' package of Common Lisp extensions at run time. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-05git-blame: an Emacs minor mode to view file with git-blame output.David Kågedal1-0/+180
Here's another version of git-blame.el that automatically tries to create a sensible list of colors to use for both light and dark backgrounds. Plus a few minor fixes. To use: 1) Load into emacs: M-x load-file RET git-blame.el RET 2) Open a git-controlled file 3) Blame: M-x git-blame-mode Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28[PATCH] Rename git-repo-config to git-config.Tom Prince1-4/+4
Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-26vc-git.el: Take into account the destination name in vc-checkout.Alexandre Julliard1-24/+8
This is necessary for vc-version-other-window. Based on a patch by Sam Vilain <sam.vilain@catalyst.net.nz>. Currently, the vc-git-checkout function uses `git checkout' to fetch a file from the git repository to the working copy. However, it is completely ignoring the input argument that specifies the destination file. `git-checkout' does not support specifying this, so we have to use `git-cat-file', capture the output in a buffer and then save it. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-25contrib/emacs/vc-git.el: support vc-version-other-windowSam Vilain1-1/+26
Currently, the vc-git-checkout function uses `git checkout' to fetch a file from the git repository to the working copy. However, it is completely ignoring the input argument that specifies the destination file. `git-checkout' does not support specifying this, so we have to use `git-cat-file', capture the output in a buffer and then save it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09git.el: Define the propertize function if needed, for XEmacs compatibility.Alexandre Julliard1-5/+13
Also use `concat' instead of `format' in the pretty-printer since format doesn't preserve properties under XEmacs. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06git.el: Avoid setting font lock keywords before entering log-edit mode.Alexandre Julliard1-8/+11
Instead, reinitialize the keywords after the fact. This avoids conflicts with other users of log-edit mode, like pcl-cvs. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06git.el: Don't use --info-only when resolving a file.Alexandre Julliard1-1/+1
It doesn't make a difference for git.el, but it helps when interacting with git-rebase and friends. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22vc-git: Ignore errors caused by a non-existent directory in vc-git-registered.Alexandre Julliard1-2/+3
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Include MERGE_MSG in the log-edit buffer even when not committing a ↵Alexandre Julliard1-1/+2
merge. This lets us take advantage of the fact that git-cherry-pick now saves the message in MERGE_MSG too. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Move point after the log message header when entering log-edit mode.Alexandre Julliard1-1/+2
Suggested by Han-Wen Nienhuys. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Added a function to open the current file in another window.Alexandre Julliard1-0/+10
Bound to 'o' by default, compatible with pcl-cvs and buffer-mode. Suggested by Han-Wen Nienhuys. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Added functions for moving to the next/prev unmerged file.Alexandre Julliard1-0/+28
This is useful when doing a merge that changes many files with only a few conflicts here and there. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-23ignore-errors requires clKarl Hasselström1-0/+2
vc-git complains that it can't find the definition of ignore-errors unless I (require 'cl). So I guess the correct place to do that is in the file itself. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-22git-vc: better installation instructionsKarl Hasselström1-1/+4
Provide some more detailed installation instructions, for the elisp-challenged among us. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05vc-git.el: Switch to using git-blame instead of git-annotate.Alexandre Julliard1-2/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05git.el: Fixed inverted "renamed from/to" message.Alexandre Julliard1-2/+2
The deleted file should be labeled "renamed to" and the added file "renamed from", not the other way around (duh!) Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-16Be nicer if git executable is not installedVille Skyttä1-1/+1
This patch avoids problems if vc-git.el is installed and activated, but the git executable is not available, for example http://list-archive.xemacs.org/xemacs-beta/200608/msg00062.html Signed-off-by: Ville Skyttä <scop@xemacs.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26Merge branch 'pb/configure'Junio C Hamano1-2/+2
* pb/configure: Rename man1 and man7 variables to man1dir and man7dir Allow INSTALL, bindir, mandir to be set in main Makefile
2006-07-23git.el: Put the git customize group in the 'tools' parent group.Alexandre Julliard1-1/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-23git.el: Try to reuse an existing buffer when running git-status.Alexandre Julliard1-1/+23
By default, running git-status again will now reuse an existing buffer that displays the same directory. The old behavior of always creating a new buffer can be obtained by customizing the git-reuse-status-buffer option. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-23git.el: Prepend a slash to the file name when adding to .gitignore.Alexandre Julliard1-1/+1
This way the ignore command will really only ignore the marked files and not files with the same name in subdirectories. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-23git.el: Run git-rerere on commits if the rr-cache directory exists.Alexandre Julliard1-0/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-13Display help for Git mode after pressing `h' or `?' in *git-status*Jakub Narebski1-0/+7
Add bindings for "h" and "?" in git-status-mode to display help about the mode, including keymap via (describe-function 'git-status-mode), like in PCL-CVS. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-13Wrap long lines in docstrings in contrib/emacs/git.elJakub Narebski1-3/+7
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-05Fix print-log and diff compatibility with recent vc versionsVille Skytt,Ad(B1-6/+7
Here's a patch that fixes print-log and diff compatibility with recent vc versions, such as current GNU Emacs CVS. Signed-off-by: Ville Skytt,Ad(B <scop@xemacs.org>
2006-06-29Allow INSTALL, bindir, mandir to be set in main MakefileJakub Narebski1-2/+2
Makefiles in subdirectories now use existing value of INSTALL, bindir, mandir if it is set, allowing those to be set in main Makefile or in included config.mak. Main Makefile exports variables which it sets. Accidentally it renames bin to bindir in Documentation/Makefile (should be bindir from start, but is unused, perhaps to be removed). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19git.el: Added a function to diff against the other heads in a merge.Alexandre Julliard1-0/+11
git-diff-file-merge-head generates a diff against the first merge head, or with a prefix argument against the nth head. Bound to `d h' by default. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19git.el: Get the default user name and email from the repository config.Alexandre Julliard1-2/+9
If user name or email are not set explicitly, get them from the user.name and user.email configuration values before falling back to the Emacs defaults. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19git.el: More robust handling of subprocess errors when returning strings.Alexandre Julliard1-16/+13
Make sure that functions that call a git process and return a string always return nil when the subprocess failed. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-05contrib/emacs/Makefile: Provide tool for byte-compiling files.Mark Wooding2-0/+21
Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04git.el: Added customize support for all parameters.Alexandre Julliard1-31/+54
Also fixed quoting of git-log-msg-separator. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04git.el: Added support for Signed-off-by.Alexandre Julliard1-5/+11
If `git-append-signed-off-by' is non-nil, automatically append a sign-off line to the log message when editing it. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04git.el: Automatically update .gitignore status.Alexandre Julliard1-3/+8
Update .gitignore files in the status list as they are created or modified. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04git.el: Set default directory before running the status mode setup hooks.Alexandre Julliard1-1/+2
Also set the list-buffers-directory variable for nicer buffer list display. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04git.el: Portability fixes for XEmacs and Emacs CVS.Alexandre Julliard1-4/+10
Fixed octal constants for XEmacs. Added highlighting support in log-edit buffer for Emacs CVS. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04contrib/emacs: Add an Emacs VC backend.Alexandre Julliard1-0/+135
Add a basic Emacs VC backend. It currently supports the following commands: checkin, checkout, diff, log, revert, and annotate. There is only limited support for working with revisions other than HEAD. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18Add an Emacs interface in contrib.Alexandre Julliard1-0/+956
This is an Emacs interface for git. The user interface is modeled on pcl-cvs. It has been developed on Emacs 21 and will probably need some tweaking to work on XEmacs. The basic command is 'M-x git-status' which displays a buffer listing modified files in the selected project tree. In that buffer the following features are supported: - add/remove files - list unknown files - commit marked files - manage .gitignore - commit merges based on MERGE_HEAD - revert files to the HEAD version - resolve conflicts with smerge or ediff - diff files against HEAD/base/mine/other or combined diff - get a log of the revisions for specified files There are plenty of unimplemented features too, see the TODO list at the top of the file... Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>