[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir
From: |
Dmitry Gutov |
Subject: |
bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir |
Date: |
Sat, 28 Sep 2024 00:49:53 +0300 |
User-agent: |
Mozilla Thunderbird |
Hi all,
On 14/09/2024 04:45, Dmitry Gutov wrote:
I can see where you're coming from though -- that default isn't very
useful, one might as well not press C-u.
Maybe we should switch to suggesting the previous revision in the prompt
even when file has changes?
Here's what seems to me an overall improvement, based on the original
change. And more consistent as well.
* No special case for when FIRST is a directory OR it's not up-to-date.
* Make REV1-DEFAULT a list value.
* In 'vc-root-version-diff', don't try calling 'vc-deduce-fileset' and
construct a (BACKEND DEFAULT-DIR) fileset right away.
As a result, 'C-u C-x v d' consistently provides completion and diff
relating to the whole repository, not for files as point (if any).
Previously, it used the revision that last touched the corresponding
file, or nil, if the file was untracked (e.g. in Dired).
Further, don't offer the working revision as REV1-DEFAULT. Except for
historical reasons and some idea of consistency, I can't see a scenario
where that would be useful, which would not be covered by calling 'C-x v
d' without a prefix. Someone please correct me here.
And combined with Spencer's patch from https://debbugs.gnu.org/62940#46,
we get this:
* First default is HEAD^ (the last revision before the latest).
* Second default is @{upstream}.
* Then the elements from vc-revision-history.
WDYT?
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Spencer Baugh, 2024/09/13
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Eli Zaretskii, 2024/09/13
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Spencer Baugh, 2024/09/13
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Dmitry Gutov, 2024/09/13
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Eli Zaretskii, 2024/09/14
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Dmitry Gutov, 2024/09/14
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Eli Zaretskii, 2024/09/14
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Juri Linkov, 2024/09/17
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir,
Dmitry Gutov <=
- bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir, Dmitry Gutov, 2024/09/27