Commit 51eb8bb4 authored by Jonas Bernoulli's avatar Jonas Bernoulli

move all libraries to new lisp/ subdirectory

and move AUTHORS.md to the Documentation/ subdirectory.  This also
requires extensive changes to the Makefiles and some libraries.
parent f7edcb7f
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
EMACSBIN ?= emacs
......@@ -6,5 +6,5 @@
/config.mk
/magit-*.tar
/magit-*.tar.gz
/magit-autoloads.el
/magit-version.el
/lisp/magit-autoloads.el
/lisp/magit-version.el
-include ../config.mk
include ../.common.mk
include ../default.mk
MAKEINFO ?= makeinfo
......@@ -10,26 +10,88 @@ INSTALL_INFO ?= $(shell \
DOC_LOAD_PATH ?= -L ../../dash -L ../../org/lisp -L ../../ox-texinfo+
.PHONY: install clean
.PHONY: texi install clean AUTHORS.md
all: magit.info magit-popup.info with-editor.info dir
all: info
%.texi: %.org
@printf "Generating $<\n"
# 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 magit.texi\n"
@$(EMACSBIN) -batch -Q $(DOC_LOAD_PATH) \
-l ox-texinfo+.el $< -f org-texinfo+export-to-texinfo
@echo >> $@
-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"
@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: all
install: install-info install-docs
install-docs: install-info
@$(MKDIR) $(DESTDIR)$(docdir)
$(CP) AUTHORS.md $(DESTDIR)$(docdir)
install-info: info
@$(MKDIR) $(DESTDIR)$(infodir)
$(CP) magit.info magit-popup.info with-editor.info $(DESTDIR)$(infodir)
$(CP) $(INFOPAGES) $(DESTDIR)$(infodir)
clean:
@$(RM) magit.info magit-popup.info with-editor.info dir
@$(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
=======
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
......@@ -246,12 +246,15 @@ Then compile the libraries and generate the info manuals:
Finally add this to your init file:
#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "~/.emacs.d/site-lisp/magit")
(add-to-list 'load-path "~/.emacs.d/site-lisp/magit/lisp")
(require 'magit)
#+END_SRC
Instead of requiring the feature ~magit~, you could instead load the
autoloads only, by loading the file ~magit-autoloads.el~.
Note that you have to add the ~lisp/~ subdirectory to the ~load-path~,
not the top-level of the repository.
Instead of requiring the feature ~magit~, you could only load the
autoloads, by loading the file ~magit-autoloads.el~.
Instead of running Magit directly the repository by adding that to
the ~load-path~, you might want to instead install it in some other
......
......@@ -470,12 +470,15 @@ $ make
Finally add this to your init file:
@lisp
(add-to-list 'load-path "~/.emacs.d/site-lisp/magit")
(add-to-list 'load-path "~/.emacs.d/site-lisp/magit/lisp")
(require 'magit)
@end lisp
Instead of requiring the feature @code{magit}, you could instead load the
autoloads only, by loading the file @code{magit-autoloads.el}.
Note that you have to add the @code{lisp/} subdirectory to the @code{load-path},
not the top-level of the repository.
Instead of requiring the feature @code{magit}, you could only load the
autoloads, by loading the file @code{magit-autoloads.el}.
Instead of running Magit directly the repository by adding that to
the @code{load-path}, you might want to instead install it in some other
......
This diff is collapsed.
......@@ -21,50 +21,17 @@ provide a unified interface to various version control systems, Magit
only supports Git and can therefore better take advantage of its
native features.
*Magit 2.0.50 requires at least GNU Emacs 24.4 and Git 1.9.4.*
Installation
============
You are looking at the `README.md` of the development branch. For
instructions on how to install the stable version of Magit see the
extended [installation instructions][install] instead.
First **uninstall** all instances of `magit`, `git-commit-mode` and
`git-rebase-mode` that you have currently installed. Doing this,
and doing it carefully (e.g. did you also install Magit using your
distributions package manager at some point?), is **very important**.
It only takes a few minutes to do this, but if everyone does it, then
that will save me hours of investigating "impossible" issues, which I
cannot actually reproduce myself.
Then install package `dash` using `install-package`. This is now
the only external dependency; the libraries `git-commit.el` and
`git-rebase.el` are now part of the Magit repository. (These
libraries were previously part of the Git-Modes repository and their
names used to end with `-mode.el`).
Then clone the Magit repository and check out the "next" branch:
$ git clone git://github.com/magit/magit.git ~/.emacs.d/site-lisp/magit
$ cd ~/.emacs.d/site-lisp/magit
$ git checkout next
Then compile the libraries:
$ make lisp
Finally add this to your init file:
(add-to-list 'load-path "~/.emacs.d/site-lisp/magit")
(require 'magit)
To update Magit use:
*Magit 2.0.50 requires at least GNU Emacs 24.4 and Git 1.9.4.*
$ git pull
$ make clean lisp
Instructions on how to install the `2.0.50` pre-release can be found
[here](http://magit.vc/manual/magit/Installation.html). `2.1.0` will
be released on the 1th of July.
To view all available targets use `make help`.
Instructions on how to install the `1.4.2` release can be found
[here](https://github.com/magit/magit/wiki/Installation).
Getting Help
============
......
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 = magit magit-popup with-editor
PACKAGE_VERSIONS = $(addsuffix -$(VERSION),$(PACKAGES))
PACKAGE_TARBALLS = $(addsuffix .tar,$(PACKAGE_VERSIONS))
INFOPAGES = $(addsuffix .info,$(PACKAGES))
TEXIPAGES = $(addsuffix .texi,$(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)
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)
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))")
-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:
@$(RM) $(ELCS) $(ELGS)
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors. If not, see http://magit.vc/authors.
;; Authors: Jonas Bernoulli <jonas@bernoul.li>
;; Sebastian Wiesner <lunaryorn@gmail.com>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors. If not, see http://magit.vc/authors.
;; Author: Phil Jackson <phil@shellarchive.co.uk>
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2011-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2012-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2008-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2008-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors. If not, see http://magit.vc/authors.
;; Magit is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors. If not, see http://magit.vc/authors.
;; This library was inspired by and replaces library `magit-key-mode',
;; which was written by Phil Jackson <phil@shellarchive.co.uk> and is
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2008-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2011-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2008-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2010-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2008-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors. If not, see http://magit.vc/authors.
;; Author: Marius Vollmer <marius.vollmer@gmail.com>
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
......@@ -1943,20 +1942,22 @@ Git, and Emacs in the echo area.\n\n(fn)"
(when toplib
(let* ((dir (file-name-directory toplib))
(static (expand-file-name "magit-version.el" dir))
(gitdir (expand-file-name ".git" dir)))
(gitdir (expand-file-name
".git" (file-name-directory (directory-file-name dir)))))
(cond ((file-exists-p gitdir)
(setq magit-version
(let ((default-directory dir))
(magit-git-string "describe" "--tags" "--dirty")))
(ignore-errors (delete-file static)))
(unless noninteractive
(ignore-errors (delete-file static))))
((file-exists-p static)
(load-file static))
((featurep 'package)
(setq magit-version
(and (fboundp 'package-desc-version)
(package-version-join
(package-desc-version
(cadr (assq 'magit package-alist))))))))))
(--when-let (assq 'magit package-alist)
(setq magit-version
(and (fboundp 'package-desc-version)
(package-version-join
(package-desc-version (cadr it))))))))))
(if (stringp magit-version)
(when (called-interactively-p 'any)
(message "Magit %s, Git %s, Emacs %s"
......
......@@ -2,9 +2,8 @@
;; Copyright (C) 2014-2015 The Magit Project Developers
;;
;; For a full list of contributors, see the AUTHORS.md file
;; at the top-level directory of this distribution and at
;; https://raw.github.com/magit/magit/master/AUTHORS.md
;; 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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment