summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-annotate.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-annotate.el
parentd3d50a9c99ef42a270127fe0f5a9e435eb760079 (diff)
downloademacs-69d24b40d2ed3cdfa7e79da4c729bddd381c8231.tar.gz
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-annotate.el')
-rw-r--r--lisp/vc/vc-annotate.el20
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index d369c90915a..3a50c9b6a2d 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -582,17 +582,15 @@ the file in question, search for the log entry required and move point."
(setq prev-rev
(vc-call-backend vc-annotate-backend 'previous-revision
(if filediff fname nil) rev))
- (if (not prev-rev)
- (message "Cannot diff from any revision prior to %s" rev)
- (vc-diff-internal
- t
- ;; The value passed here should follow what
- ;; `vc-deduce-fileset' returns.
- (list vc-annotate-backend
- (if filediff
- (list fname)
- nil))
- prev-rev rev))))))
+ (vc-diff-internal
+ t
+ ;; The value passed here should follow what
+ ;; `vc-deduce-fileset' returns.
+ (list vc-annotate-backend
+ (if filediff
+ (list fname)
+ nil))
+ prev-rev rev)))))
(defun vc-annotate-show-diff-revision-at-line ()
"Visit the diff of the revision at line from its previous revision."