summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-05-18 15:49:13 +0300
committerDmitry Gutov <dgutov@yandex.ru>2015-05-18 15:50:57 +0300
commit69d24b40d2ed3cdfa7e79da4c729bddd381c8231 (patch)
treec48c2877459e95f1542663d546ec11682cceec2c /lisp/vc/vc.el
parentd3d50a9c99ef42a270127fe0f5a9e435eb760079 (diff)
downloademacs-69d24b40d2ed3cdfa7e79da4c729bddd381c8231.tar.gz
emacs-69d24b40d2ed3cdfa7e79da4c729bddd381c8231.tar.bz2
emacs-69d24b40d2ed3cdfa7e79da4c729bddd381c8231.zip
Improve handling of the first Git revision
* lisp/vc/log-view.el (log-view-toggle-entry-display): When there's no next entry, delete until the end of the buffer. (log-view-end-of-defun-1): Stop at eob. * lisp/vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): Don't give up when previous-revision is nil. * lisp/vc/vc-git.el (vc-git-expanded-log-entry): End the arguments with `--' to avoid ambiguity. (vc-git-annotate-extract-revision-at-line): Exclude `^' from the returned revision string. (vc-git-annotate-time): Expect `^' before the first revision. * lisp/vc/vc-git.el (vc-git-diff): Diff against an empty tree if REV1 is nil, and REV2 is not. * lisp/vc/vc.el: Update the description of the `diff' function.
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index d5d0abe6517..1bd04e13430 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -367,7 +367,8 @@
;; BUFFER is nil. If ASYNC is non-nil, run asynchronously. If REV1
;; and REV2 are non-nil, report differences from REV1 to REV2. If
;; REV1 is nil, use the working revision (as found in the
-;; repository) as the older revision; if REV2 is nil, use the
+;; repository) as the older revision if REV2 is nil as well;
+;; otherwise, diff against an empty tree. If REV2 is nil, use the
;; current working-copy contents as the newer revision. This
;; function should pass the value of (vc-switches BACKEND 'diff) to
;; the backend command. It should return a status of either 0 (no