commit e9a5df0576d660dfc5d1d3e6bbb45406654e7dde from: Omar Polo date: Tue Aug 10 09:55:34 2021 UTC make vc-annotate-show-diff-revision-at-line works Improving vc-got-diff so the diff-at-line works in *Annotate* buffer. vc-got-diff is still not 100% compliant to the interface thought. The ``diff against an empty tree'' is still missing. commit - 7726b6c92c1c3f353d2fa12fc8c2eff2f53fd156 commit + e9a5df0576d660dfc5d1d3e6bbb45406654e7dde blob - 1da78878697b051a2690304b73c45ec8a9a0b89c blob + 92b9a8ce21c4aba9e220cf725ed790cd5f299db9 --- vc-got.el +++ vc-got.el @@ -698,11 +698,15 @@ Heavily inspired by `vc-git-log-view-mode'." (inhibit-read-only t)) (with-current-buffer buffer (vc-got-with-worktree (car files) - (cond ((and (null rev1) - (null rev2)) - (dolist (file files) - (vc-got--diff file))) - (t (error "Not implemented"))))))) + (if (and (null rev1) + (null rev2)) + (dolist (file files) + (vc-got--diff file)) + ;; TODO: if rev1 is nil, diff from the current version until + ;; rev2. + ;; TODO: if rev2 is nil as well, diff against an empty tree + ;; (i.e. get the patch from `got log -p rev1') + (vc-got--diff rev1 rev2)))))) (defun vc-got-annotate-command (file buf &optional rev) "Show annotated contents of FILE in buffer BUF. If given, use revision REV."