diff options
| author | Juri Linkov | 2019-05-19 23:11:27 +0300 |
|---|---|---|
| committer | Juri Linkov | 2019-05-19 23:11:27 +0300 |
| commit | 82db17d0d1231c4aa26e837f37428c44a67663ea (patch) | |
| tree | 086396528dfd2f83657992ddf1bb88e3789f0909 /lisp | |
| parent | 1b2b136a17d222892af9c25559e1b4c41de7831c (diff) | |
| download | emacs-82db17d0d1231c4aa26e837f37428c44a67663ea.tar.gz emacs-82db17d0d1231c4aa26e837f37428c44a67663ea.zip | |
Publicize behavior of log-view-diff at beginning/end of active region
* lisp/vc/log-view.el (log-view-diff, log-view-diff-changeset):
* doc/emacs/maintaining.texi (VC Change Log): Document behavior of
log-view-diff at the beginning and the end of the log buffer
when the region is active. (Bug#35624)
* lisp/vc/vc-git.el (vc-git-print-log): Insert newline at the
beginning to enable the feature of diffing with the working revision.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/vc/log-view.el | 14 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 3389264ce6e..0b57e1d5086 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el | |||
| @@ -585,6 +585,13 @@ point, get the diff between the revision at point and its | |||
| 585 | previous revision. Otherwise, get the diff between the revisions | 585 | previous revision. Otherwise, get the diff between the revisions |
| 586 | where the region starts and ends. | 586 | where the region starts and ends. |
| 587 | 587 | ||
| 588 | When the beginning of the region is on the top line that has no revision, | ||
| 589 | use the current working revision as the first revision to compare. | ||
| 590 | |||
| 591 | When the end of the region is on the bottom non-revision line after | ||
| 592 | the last revision line, use the previous revision of the last | ||
| 593 | displayed revision as the second revision to compare. | ||
| 594 | |||
| 588 | Unlike `log-view-diff-changeset', this function only shows the | 595 | Unlike `log-view-diff-changeset', this function only shows the |
| 589 | part of the changeset which affected the currently considered | 596 | part of the changeset which affected the currently considered |
| 590 | file(s)." | 597 | file(s)." |
| @@ -600,6 +607,13 @@ point, get the diff between the revision at point and its | |||
| 600 | previous revision. Otherwise, get the diff between the revisions | 607 | previous revision. Otherwise, get the diff between the revisions |
| 601 | where the region starts and ends. | 608 | where the region starts and ends. |
| 602 | 609 | ||
| 610 | When the beginning of the region is on the top line that has no revision, | ||
| 611 | use the current working revision as the first revision to compare. | ||
| 612 | |||
| 613 | When the end of the region is on the bottom non-revision line after | ||
| 614 | the last revision line, use the previous revision of the last | ||
| 615 | displayed revision as the second revision to compare. | ||
| 616 | |||
| 603 | Unlike `log-view-diff' this function shows the whole changeset, | 617 | Unlike `log-view-diff' this function shows the whole changeset, |
| 604 | including changes affecting other files than the currently | 618 | including changes affecting other files than the currently |
| 605 | considered file(s)." | 619 | considered file(s)." |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 61c13026cc5..b6feb3b8d1e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -1017,8 +1017,8 @@ If LIMIT is a revision string, use it as an end-revision." | |||
| 1017 | ;; If the buffer exists from a previous invocation it might be | 1017 | ;; If the buffer exists from a previous invocation it might be |
| 1018 | ;; read-only. | 1018 | ;; read-only. |
| 1019 | (let ((inhibit-read-only t)) | 1019 | (let ((inhibit-read-only t)) |
| 1020 | (with-current-buffer | 1020 | (with-current-buffer buffer |
| 1021 | buffer | 1021 | (insert "\n") |
| 1022 | (apply 'vc-git-command buffer | 1022 | (apply 'vc-git-command buffer |
| 1023 | 'async files | 1023 | 'async files |
| 1024 | (append | 1024 | (append |