Commit ab0c22ac authored by Barak A. Pearlmutter's avatar Barak A. Pearlmutter

Imported Upstream version 2.1.0

parent 671da3cd
This diff is collapsed.
Authors
=======
Also see https://github.com/magit/magit/graphs/contributors.
The following people have contributed to Magit, including the
libraries `git-commit.el`, `magit-popup.el`, and `with-editor.el`
which are distributed as separate Elpa packages.
For statistics see http://magit.vc/stats/authors.html.
Names below are sorted alphabetically.
Author
......@@ -26,14 +31,16 @@ Retired Maintainers
Contributors
------------
- aaa707 <aaa707b@gmail.com>
- Aaron Culich <aculich@gmail.com>
- Abdo Roig-Maranges <abdo.roig@gmail.com>
- acple <silentsphere110@gmail.com>
- Adam Spiers <emacs@adamspiers.org>
- Adeodato Simó <dato@net.com.org.es>
- Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Alan Falloon <alan.falloon@gmail.com>
- Alex Dunn <dunn.alex@gmail.com>
- Alexey Voinov <alexey.v.voinov@gmail.com>
- Alex Kost <alezost@gmail.com>
- Alex Ott <alexott@gmail.com>
- Andreas Fuchs <asf@boinkor.net>
- Andreas Liljeqvist <andreas.liljeqvist@robacks.se>
......@@ -42,6 +49,7 @@ Contributors
- Andrew Kirkpatrick <andrew.kirkpatrick@adelaide.edu.au>
- Andrew Schwartzmeyer <andrew@schwartzmeyer.com>
- Andrey Smirnov <andrew.smirnov@gmail.com>
- Andy Sawyer <git@pureabstract.org>
- Bastian Beischer <beischer@physik.rwth-aachen.de>
- Ben Walton <bwalton@artsci.utoronto.ca>
- Bradley Wright <brad@intranation.com>
......@@ -75,25 +83,30 @@ Contributors
- Evgkeni Sampelnikof <esabof@gmail.com>
- Felix Geller <fgeller@gmail.com>
- Feng Li <fengli@blackmagicdesign.com>
- Florian Ragwitz <rafl@debian.org>
- Geoff Shannon <geoffpshannon@gmail.com>
- George Kadianakis <desnacked@gmail.com>
- Graham Clark <grclark@gmail.com>
- Greg A. Woods <woods@planix.com>
- Greg Sexton <gregsexton@gmail.com>
- Guillaume Martres <smarter@ubuntu.com>
- Hannu Koivisto <azure@iki.fi>
- Hans-Peter Deifel <hpdeifel@gmx.de>
- Ian Eure <ian.eure@gmail.com>
- Ingo Lohmar <i.lohmar@gmail.com>
- Jan Tatarik <jan.tatarik@xing.com>
- Jasper St. Pierre <jstpierre@mecheye.net>
- Jeff Bellegarde <jbellegarde@whitepages.com>
- Jeff Dairiki <dairiki@dairiki.org>
- Jesse Alama <jesse.alama@gmail.com>
- John Mastro <john.b.mastro@gmail.com>
- John Wiegley <johnw@newartisans.com>
- Jonas Bernoulli <jonas@bernoul.li>
- Jonathan Roes <jroes@jroes.net>
- Jordan Greenberg <jordan@softwareslave.com>
- Julien Danjou <julien@danjou.info>
- Justin Caratzas <justin.caratzas@gmail.com>
- Kan-Ru Chen <koster@debian.org>
- Kimberly Wolk <kimwolk@hotmail.com>
- Kyle Meyer <kyle@kyleam.com>
- Laurent Laffont <laurent.laffont@gmail.com>
......@@ -101,6 +114,7 @@ Contributors
- Lele Gaifax <lele@metapensiero.it>
- Leo Liu <sdl.web@gmail.com>
- Leonardo Etcheverry <leo@kalio.net>
- Lingchao Xin <douglarek@users.noreply.github.com>
- Lluís Vilanova <vilanova@ac.upc.edu>
- Loic Dachary <loic@dachary.org>
- Luís Borges de Oliveira <lbo@siscog.pt>
......@@ -113,11 +127,15 @@ Contributors
- Marian Schubert <marian.schubert@gooddata.com>
- Marius Vollmer <marius.vollmer@gmail.com>
- Mark Hepburn <Mark.Hepburn@csiro.au>
- Mark Oteiza <mvoteiza@udel.edu>
- Matus Goljer <dota.keys@gmail.com>
- Michael Fogleman <michaelwfogleman@gmail.com>
- Michael Griffiths <mikey@cich.li>
- Michal Sojka <sojkam1@fel.cvut.cz>
- Miles Bader <miles@gnu.org>
- Mitchel Humpherys <mitch.special@gmail.com>
- Moritz Bunkus <moritz@bunkus.org>
- Nathan Weizenbaum <nex342@gmail.com>
- Natalie Weizenbaum <nex342@gmail.com>
- Nguyễn Tuấn Anh <ubolonton@gmail.com>
- Nic Ferier <nic@ferrier.me.uk>
- Nick Alcock <nick.alcock@oracle.com>
......@@ -127,10 +145,12 @@ Contributors
- Nicolas Richard <theonewiththeevillook@yahoo.fr>
- Noam Postavsky <npostavs@users.sourceforge.net>
- Ole Arndt <oliver.arndt@cegedim.com>
- Oleh Krehel <ohwoeowho@gmail.com>
- Óscar Fuentes <ofv@wanadoo.es>
- Paul Stadig <paul@stadig.name>
- Pavel Holejsovsky <pavel.holejsovsky@upek.com>
- Pekka Pessi <nospam@pessi.fi>
- Peter Eisentraut <peter@eisentraut.org>
- Peter J. Weisberg <pj@irregularexpressions.net>
- Peter Vasil <mail@petervasil.net>
- Philippe Vaucher <philippe.vaucher@gmail.com>
......@@ -152,7 +172,6 @@ Contributors
- Romain Francoise <romain@orebokech.com>
- Ron Parker <rparker@a123systems.com>
- Roy Crihfield <rscrihf@gmail.com>
- Rüdiger Sonderfeld <ruediger@c-plusplus.de>
- Rüdiger Sonderfeld <ruediger@c-plusplus.net>
- Ryan C. Thompson <rct@thompsonclan.org>
- Samuel Bronson <naesten@gmail.com>
......@@ -170,17 +189,25 @@ Contributors
- Steven Thomas <sthomas314@gmail.com>
- Steve Purcell <steve@sanityinc.com>
- Suhail Shergill <suhailshergill@gmail.com>
- Syohei Yoshida <syohex@gmail.com>
- Takafumi Arakaki <aka.tkf@gmail.com>
- Teemu Likonen <tlikonen@iki.fi>
- Teruki Shigitani <teruki.shigitani@gmail.com>
- Thierry Volpiatto <thierry.volpiatto@gmail.com>
- Thomas A Caswell <tcaswell@gmail.com>
- Thomas Frössman <thomasf@jossystem.se>
- Thomas Jost <thomas.jost@gmail.com>
- Thomas Riccardi <riccardi.thomas@gmail.com>
- Tibor Simko <tibor.simko@cern.ch>
- Timo Juhani Lindfors <timo.lindfors@iki.fi>
- Tim Perkins <tprk77@gmail.com>
- Tim Wraight <tim@wraight.net>
- Ting-Yu Lin <aethanyc@gmail.com>
- Tom Feist <shabble@metavore.org>
- Wei Huang <weih@opera.com>
- Wilfred Hughes <me@wilfred.me.uk>
- Win Treese <treese@acm.org>
- Xavier Noria <fxn@hashref.com>
- Yann Hodique <yann.hodique@gmail.com>
- York Zhao <gtdplatform@gmail.com>
- Yuichi Higashi <aaa707b@gmail.com>
-include ../config.mk
include ../default.mk
MAKEINFO ?= makeinfo
INSTALL_INFO ?= $(shell \
hash ginstall-info 2> /dev/null\
&& printf ginstall-info\
|| printf install-info)
DOC_LOAD_PATH ?= -L ../../dash -L ../../org/lisp -L ../../ox-texinfo+
.PHONY: texi install clean AUTHORS.md
all: info
# Because most users don't have the necessary tools we cannot
# use "%.texi: %.org". Instead we have to hardcode each file
# using a shared target.
texi: $(TEXIPAGES)
@printf "Generating texi files\n"
@printf "WARNING: This creates whitespace errors in code blocks.\n"
@printf "WARNING: Discard these whitespace errors before committing.\n"
@printf "WARNING: Also see https://github.com/magit/magit/issues/1912.\n"
@printf "Generating magit.texi\n"
@$(EMACSBIN) -batch -Q $(DOC_LOAD_PATH) \
-l ox-texinfo+.el magit.org -f org-texinfo+export-to-texinfo
@echo >> magit.texi
@printf "Generating magit-popup.texi\n"
@$(EMACSBIN) -batch -Q $(DOC_LOAD_PATH) \
-l ox-texinfo+.el magit-popup.org -f org-texinfo+export-to-texinfo
@echo >> magit-popup.texi
@printf "Generating with-editor.texi\n"
@$(EMACSBIN) -batch -Q $(DOC_LOAD_PATH) \
-l ox-texinfo+.el with-editor.org -f org-texinfo+export-to-texinfo
@echo >> with-editor.texi
info: $(INFOPAGES) dir
%.info: %.texi
@printf "Generating $@\n"
@$(MAKEINFO) $< -o $@
dir: magit.info magit-popup.info with-editor.info
@printf "Generating dir\n"
@echo $^ | xargs -n 1 $(INSTALL_INFO) --dir=$@
install: install-info install-docs
install-docs: install-info
@$(MKDIR) $(DESTDIR)$(docdir)
$(CP) AUTHORS.md $(DESTDIR)$(docdir)
install-info: info
@$(MKDIR) $(DESTDIR)$(infodir)
$(CP) $(INFOPAGES) $(DESTDIR)$(infodir)
clean:
@printf "Cleaning Documentation/*...\n"
@$(RM) $(INFOPAGES) dir
authors: AUTHORS.md
AUTHORS.md:
@printf "Generating AUTHORS.md..."
@test -d $(TOP).git \
&& (printf "$$AUTHORS_HEADER\n" > $@ \
&& git log --pretty=format:'- %aN <%aE>' | sort -u >> $@ \
&& printf "done\n" ; ) \
|| printf "FAILED (non-fatal)\n"
define AUTHORS_HEADER
Authors
=======
The following people have contributed to Magit, including the
libraries `git-commit.el`, `magit-popup.el`, and `with-editor.el`
which are distributed as separate Elpa packages.
For statistics see http://magit.vc/stats/authors.html.
Names below are sorted alphabetically.
Author
------
- Marius Vollmer <marius.vollmer@gmail.com>
Maintainer
----------
- Jonas Bernoulli <jonas@bernoul.li>
Retired Maintainers
-------------------
- Nicolas Dudebout <nicolas.dudebout@gatech.edu>
- Peter J. Weisberg <pj@irregularexpressions.net>
- Phil Jackson <phil@shellarchive.co.uk>
- Rémi Vanicat <vanicat@debian.org>
- Yann Hodique <yann.hodique@gmail.com>
Contributors
------------
endef
export AUTHORS_HEADER
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
It's Magit! A Git Porcelain inside Emacs
=========================================
Magit is an interface to the version control system [Git][git],
implemented as an [Emacs][emacs] package.
Unlike the [VC][vc] package which is part of Emacs and strives to
provide a unified interface to various version control systems, Magit
only supports Git and can therefore better take advantage of its
native features.
*Magit supports GNU Emacs 23.2 or later; 24.1 or later is recommended.*
*Magit supports Git 1.7.2.5 or later; 1.8.2 or later is recommended.*
### Table of Contents
* [Installation](#installation)
* [Getting Started](#getting-started)
* [Getting Help](#getting-help)
* [Contributions](#contributions)
* [Dependencies](#dependencies)
Installation
<a href="#readme"></a>
<p align="center"><img src="http://magit.vc/img/magit.png"/></p>
<h1 align="center">It's Magit!</h1>
<h2 align="center">A Git Porcelain inside Emacs</h2>
<p align="center">
<a href="http://magit.vc"><b>homepage</b></a> |
<a href="http://magit.vc/manual"><b>manual</b></a> |
<a href="http://magit.vc/manual/magit/FAQ.html"><b>faq</b></a> |
<a href="https://github.com/magit/magit/wiki"><b>wiki</b></a> |
<a href="https://groups.google.com/forum/?fromgroups#!forum/magit"><b>mailing list</b></a> |
<a href="http://emacs.stackexchange.com/questions/tagged/magit"><b>forum</b></a> |
<a href="https://gitter.im/magit/magit"><b>chat</b></a> |
<a href="https://twitter.com/magit_emacs"><b>news</b></a>
</p>
***
<p align="justify">
Magit is an interface to the version control system
<a href="http://git-scm.com">Git</a>, implemented as an
<a href="http://www.gnu.org/software/emacs">Emacs</a> package.
Magit aspires to be a complete Git porcelain. While we cannot
(yet) claim that Magit wraps and improves upon each and every Git
command, it is complete enough to allow even experienced Git users
to perform almost all of their daily version control tasks directly
from within Emacs. While many fine Git clients exist, only Magit
and Git itself deserve to be called porcelains.
<a href="http://magit.vc/about.html">(more)</a>
</p>
***
<p align="center">
Please consider supporting development by making a
<a href="http://magit.vc/donations.html">donation</a>.
</p>
***
Support
=======
**When something doesn't work as expected then please first see the
[FAQ][faq].** Then also try the list of [open issues][issues] and use
the search box at the top of that page to find older related issues.
You should also consult the [manual][manual] and ask a general-purpose
search engine.
If everything else fails then ask for help on the
**[Emacs Stackexchange site][forum]**, the
[mailing list][list], or the
[Gitter chat][chat].
**Please do NOT use the Github issue tracker for support requests.**
**We only use it for feature requests and bug reports.**
Contributing
============
We recommend that you use Emacs' package manager (`package.el`),
to install Magit from your preferred Elpa archive ([Melpa][melpa],
[Melpa-Stable][melpa-stable], or [Marmalade][marmalade]). If you
haven't used the package manager before, or would like to install
directly from Magit's Git repository, then consult the detailed
[installation instructions][install].
To report bugs and suggest new feature use the
[issue tracker][issues]. If you have some code which you would like
to be merged, then open a [pull requests][pulls]. Please also see
[CONTRIBUTING.md][contrib].
Getting Started
Acknowledgments
===============
To get started with Magit show a summary of its status in a
new buffer using <kbd>M-x magit-status RET</kbd>. Navigate the
buffer using <kbd>n</kbd> and <kbd>p</kbd>, and toggle sections using
<kbd>TAB</kbd>. Edit and save some files, refresh the status buffer
using <kbd>g</kbd>, stage files or individual hunks using <kbd>s</kbd>
and initiate a commit using <kbd>c c</kbd> the staged changes. When
done writing the commit message use <kbd>C-c C-c</kbd> to actually
create the commit.
For more details consult the user manual. You can read it with
<kbd>C-u C-h i magit.info RET</kbd> or [on the web][manual]. Magit
also has a [website][website].
Getting Help
============
When something doesn't work as expected please see the [FAQ][faq], and
the list of [open issues][issues], and use the search box at the top
of the latter to find older related issues. If everything else fails
ask for help on the [Emacs Stackexchange][emacsstack] site or the
[mailing list][group].
Contributions
=============
Magit is [hosted on Github][development]. Please contribute by
reporting bugs and suggesting features on the [issue tracker][issues]
or by making code contributions using [pull requests][pulls]. Before
opening a pull request read the brief
[contribution guidelines][contributing].
Please also consider supporting development by making a
[monetary donation][donations]. Thank you!
Magit was started by [Marius Vollmer][marius] and is now maintained
by [Jonas Bernoulli][jonas]. Other Magitians (former maintainers)
are [Nicolas Dudebout][nicolas], [Peter J. Weisberg][peter],
by [Jonas Bernoulli][jonas]. Other former maintainers are
[Nicolas Dudebout][nicolas], [Peter J. Weisberg][peter],
[Phil Jackson][phil], [Rémi Vanicat][remi], and [Yann Hodique][yann].
Many more people have [contributed code][stats-authors] and suggested
Many more people have [contributed code][authors] and suggested
features.
Thanks to all of you, may (the history of) the source be with you!
Dependencies
============
***
[![Build Status](https://travis-ci.org/magit/magit.svg?branch=master)](https://travis-ci.org/magit/magit)
[contrib]: https://github.com/magit/magit/blob/master/CONTRIBUTING.md
[issues]: https://github.com/magit/magit/issues
[pulls]: https://github.com/magit/magit/pulls
[authors]: http://magit.vc/stats/authors.html
[faq]: http://magit.vc/manual/magit/FAQ.html
[manual]: http://magit.vc/manual
[chat]: https://gitter.im/magit/magit
[forum]: http://emacs.stackexchange.com/questions/tagged/magit
[list]: https://groups.google.com/forum/?fromgroups#!forum/magit
If you install Magit using Emacs' package manager then dependencies
are automatically being taken care of. Otherwise you have to track
down dependencies and install them manually.
Magit requires the libraries `git-commit-mode` and `git-rebase-mode`
which are part of the [magit/git-modes][git-modes] repository and are
distributed as separate packages.
The library `magit-wip` additionally requires the [`git-wip`][git-wip]
script, which you have to install manually.
[contributing]: https://github.com/magit/magit/blob/master/CONTRIBUTING.md
[development]: http://github.com/magit/magit
[donations]: http://magit.vc/donations.html
[emacsstack]: http://emacs.stackexchange.com/questions/tagged/magit
[faq]: https://github.com/magit/magit/wiki/FAQ
[group]: https://groups.google.com/forum/?fromgroups#!forum/magit
[install]: https://github.com/magit/magit/wiki/Installation
[issues]: https://github.com/magit/magit/issues
[manual]: http://magit.vc/manual/master
[pulls]: https://github.com/magit/magit/pulls
[stats-authors]: http://magit.vc/stats/authors.html
[website]: http://magit.vc
[jonas]: http://emacsair.me
[marius]: https://github.com/mvollmer
[jonas]: http://emacsair.me
[marius]: https://github.com/mvollmer
[nicolas]: http://dudebout.com
[peter]: https://github.com/pjweisberg
[phil]: https://github.com/philjackson
[remi]: https://github.com/vanicat
[yann]: http://www.hodique.info
[emacs]: http://www.gnu.org/software/emacs
[git-wip]: https://github.com/bartman/git-wip
[git]: http://git-scm.com
[git-modes]: https://github.com/magit/git-modes
[marmalade]: http://marmalade-repo.org
[melpa]: http://melpa.org
[melpa-stable]: http://stable.melpa.org
[vc]: http://www.gnu.org/software/emacs/manual/html_node/emacs/Version-Control.html
[peter]: https://github.com/pjweisberg
[phil]: https://github.com/philjackson
[remi]: https://github.com/vanicat
[yann]: http://www.hodique.info
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
PREFIX ?= /usr/local
sharedir ?= $(PREFIX)/share
lispdir ?= $(sharedir)/emacs/site-lisp/magit
infodir ?= $(sharedir)/info
docdir ?= $(sharedir)/doc/magit
statsdir ?= ./stats
CP ?= install -p -m 644
MKDIR ?= install -p -m 755 -d
RMDIR ?= rm -rf
TAR ?= tar
PACKAGES = with-editor git-commit magit-popup magit
PACKAGE_VERSIONS = $(addsuffix -$(VERSION),$(PACKAGES))
INFOPAGES = $(addsuffix .info,$(filter-out git-commit,$(PACKAGES)))
TEXIPAGES = $(addsuffix .texi,$(filter-out git-commit,$(PACKAGES)))
ELS = with-editor.el
ELS += git-commit.el
ELS += magit-popup.el
ELS += magit-utils.el
ELS += magit-section.el
ELS += magit-git.el
ELS += magit-mode.el
ELS += magit-process.el
ELS += magit-core.el
ELS += magit-diff.el
ELS += magit-wip.el
ELS += magit-apply.el
ELS += magit-log.el
ELS += magit.el
ELS += magit-sequence.el
ELS += magit-commit.el
ELS += magit-remote.el
ELS += magit-bisect.el
ELS += magit-stash.el
ELS += magit-blame.el
ELS += magit-ediff.el
ELS += magit-extras.el
ELS += git-rebase.el
ELCS = $(ELS:.el=.elc)
ELMS = magit.el $(filter-out $(addsuffix .el,$(PACKAGES)),$(ELS))
ELGS = magit-autoloads.el magit-version.el
EMACSBIN ?= emacs
ELPA_DIR ?= $(HOME)/.emacs.d/elpa
DASH_DIR ?= $(shell \
find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/dash-[.0-9]*' 2> /dev/null | \
sort | tail -n 1)
ifeq "$(DASH_DIR)" ""
DASH_DIR = $(TOP)../dash
endif
CYGPATH := $(shell cygpath --version 2>/dev/null)
ifdef CYGPATH
LOAD_PATH ?= -L $(TOP)/lisp -L $(shell cygpath --mixed $(DASH_DIR))
else
LOAD_PATH ?= -L $(TOP)/lisp -L $(DASH_DIR)
endif
BATCH = $(EMACSBIN) -batch -Q $(LOAD_PATH)
EMACSOLD := $(shell $(BATCH) --eval \
"(and (version< emacs-version \"24.4\") (princ \"true\"))")
ifeq "$(EMACSOLD)" "true"
$(error At least version 24.4 of Emacs is required)
endif
VERSION := $(shell \
test -e $(TOP).git\
&& git describe --tags --dirty 2> /dev/null\
|| $(BATCH) --eval "(progn\
(fset 'message (lambda (&rest _)))\
(load-file \"magit-version.el\")\
(princ magit-version))")
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir, Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
Emacs
* Magit (1.4.0): (magit). Using Git from Emacs with Magit. (1.4.0)
-include ../config.mk
include ../default.mk
.PHONY: magit-version.el install
all: lisp
with-editor.elc:
git-commit.elc: with-editor.elc
magit-utils.elc:
magit-section.elc: magit-utils.elc
magit-git.elc: magit-utils.elc magit-section.elc
magit-mode.elc: magit-section.elc magit-git.elc
magit-popup.elc:
magit-process.elc: with-editor.elc magit-utils.elc magit-section.elc \
magit-git.elc magit-mode.elc
magit-core.elc: magit-utils.elc magit-section.elc magit-git.elc \
magit-mode.elc magit-popup.elc magit-process.elc
magit-diff.elc: git-commit.elc magit-core.elc
magit-wip.elc: magit-core.elc
magit-apply.elc: magit-core.elc magit-diff.elc magit-wip.elc
magit-log.elc: magit-core.elc magit-diff.elc
magit.elc: with-editor.elc git-commit.elc \
magit-core.elc magit-diff.elc magit-apply.elc magit-log.elc
magit-sequence.elc: magit.elc
magit-commit.elc: magit.elc magit-sequence.elc
magit-remote.elc: magit.elc
magit-bisect.elc: magit.elc
magit-stash.elc: magit.elc
magit-blame.elc: magit.elc
magit-ediff.elc: magit.elc
magit-extras.elc: magit.elc
git-rebase.elc: magit.elc with-editor.elc
lisp: $(ELCS) magit-version.el magit-autoloads.el
%.elc: %.el
@printf "Compiling $<\n"
@$(BATCH) --eval "(progn\
(when (file-exists-p \"$@\")\
(delete-file \"$@\"))\
(setq with-editor-emacsclient-executable nil)\
(fset 'message* (symbol-function 'message))\
(fset 'message (lambda (f &rest a)\
(unless (equal f \"Wrote %s\")\
(apply 'message* f a)))))" \
-f batch-byte-compile $<
magit-version.el:
@printf "Generating $@\n"
@printf ";;; magit-version.el --- the Magit version you are using\n\n" > $@
@printf "(setq magit-version \""$(VERSION)"\")\n\n" >> $@
@printf "(provide 'magit-version)\n\n" >> $@
@printf ";; Local Variables:\n" >> $@
@printf ";; version-control: never\n" >> $@
@printf ";; no-byte-compile: t\n" >> $@
@printf ";; no-update-autoloads: t\n" >> $@
@printf ";; coding: utf-8\n" >> $@
@printf ";; End:\n" >> $@
@printf ";;; magit-version.el ends here\n" >> $@
magit-autoloads.el: $(ELS)
@printf "Generating $@\n"
@$(BATCH) --eval "(progn\
(fset 'message (lambda (&rest _)))\
(setq make-backup-files nil)\
(setq vc-handled-backends nil)\
(setq default-directory (file-truename default-directory))\
(setq generated-autoload-file (expand-file-name \"magit-autoloads.el\"))\
(setq find-file-visit-truename t)\
(update-directory-autoloads default-directory)))"
install: lisp
@$(MKDIR) $(DESTDIR)$(lispdir)
$(CP) $(ELS) magit-autoloads.el magit-version.el $(ELCS) $(DESTDIR)$(lispdir)
clean:
@printf "Cleaning lisp/*...\n"
@$(RM) $(ELCS) $(ELGS)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
;;; magit-bisect.el --- bisect support for Magit
;; Copyright (C) 2011-2015 The Magit Project Contributors
;;
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors. If not, see http://magit.vc/authors.
;; Author: Jonas Bernoulli <jonas@bernoul.li>
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
;; Magit is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; Magit is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
;; License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with Magit. If not, see http://www.gnu.org/licenses.
;;; Commentary:
;; Use a binary search to find the commit that introduced a bug.
;;; Code:
(require 'magit)
(defface magit-bisect-good
'((t :foreground "DarkOliveGreen"))
"Face for good bisect revisions."
:group 'magit-faces)
(defface magit-bisect-skip
'((t :foreground "DarkGoldenrod"))
"Face for skipped bisect revisions."
:group 'magit-faces)
(defface magit-bisect-bad
'((t :foreground "IndianRed4"))
"Face for bad bisect revisions."
:group 'magit-faces)
;;;###autoload (autoload 'magit-bisect-popup "magit-bisect" nil t)
(magit-define-popup magit-bisect-popup
"Popup console for bisect commands."
'magit-commands 'magit-popup-sequence-mode
:man-page "git-bisect"
:actions '((?B "Start" magit-bisect-start)
(?a "Run" magit-bisect-run))
:sequence-actions '((?r "Reset" magit-bisect-reset)
(?b "Bad" magit-bisect-bad)
(?g "Good" magit-bisect-good)
(?k "Skip" magit-bisect-skip))
:sequence-predicate 'magit-bisect-in-progress-p)
;;;###autoload
(defun magit-bisect-start (bad good)
"Start a bisect session.
Bisecting a bug means to find the commit that introduced it.
This command starts such a bisect session by asking for a know
good and a bad commit. To move the session forward use the
other actions from the bisect popup (\
\\<magit-status-mode-map>\\[magit-bisect-popup])."
(interactive
(if (magit-bisect-in-progress-p)
(user-error "Already bisecting")
(let ((b (magit-read-branch-or-commit "Start bisect with bad revision")))
(list b (magit-read-other-branch-or-commit "Good revision" b)))))
(magit-bisect-async "start" (list bad good) t))
;;;###autoload
(defun magit-bisect-reset ()
"After bisecting, cleanup bisection state and return to original `HEAD'."
(interactive)
(when (magit-confirm 'reset-bisect)
(magit-run-git "bisect" "reset")
(ignore-errors (delete-file (magit-git-dir "BISECT_CMD_OUTPUT")))))
;;;###autoload
(defun magit-bisect-good ()
"While bisecting, mark the current commit as good.
Use this after you have asserted that the commit does not contain
the bug in question."
(interactive)
(magit-bisect-async "good"))
;;;###autoload
(defun magit-bisect-bad ()
"While bisecting, mark the current commit as bad.
Use this after you have asserted that the commit does contain the
bug in question."
(interactive)
(magit-bisect-async "bad"))
;;;###autoload
(defun magit-bisect-skip ()
"While bisecting, skip the current commit.
Use this if for some reason the current commit is not a good one
to test. This command lets Git choose a different one."
(interactive)
(magit-bisect-async "skip"))
;;;###autoload
(defun magit-bisect-run (cmdline)
"Bisect automatically by running commands after each step."
(interactive (list (read-shell-command "Bisect shell command: ")))
(magit-bisect-async "run" (list cmdline)))
(defun magit-bisect-async (subcommand &optional args no-assert)
(unless (or no-assert (magit-bisect-in-progress-p))