|
From: | Dmitry Gutov |
Subject: | bug#21383: Static revisions in vc-working-revision |
Date: | Thu, 3 Sep 2015 22:24:51 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 |
On 09/03/2015 07:04 PM, Stefan Monnier wrote:
I think the problem is in the contract between VC itself and the backends, because VC mostly assumes that default-directory doesn't matter and uses absolute file names instead (that was the original design), whereas for many backends this is sometimes inconvenient so they occasionally rely on default-directory instead, which happens to work as well, tho it's mostly an accident.
Yes.
And are you talking about FILE arg to vc-status, or e.g. vc-git-status?vc-git-status (and other backend operations).
That might be viable. But the commands that don't use FILE currently only need the root, so we could avoid passing the argument in entirely.
Right, we could fix the problem by keeping the original design and making sure the backends actually follow it, but I'm not sure it's the better design nowadays (and since using default-directory happens to work in 99% of the cases, it's hard to make sure we really fix all cases where we incorrectly rely on default-directory being the right parent of the absolute file names we get).
That is true. But could we abandon the current design for all backends? Some of the older ones still don't have vc-root implemented (because it's impossible for some of them?), and until it is, vc-state and friends won't know what to set default-directory to.
[Prev in Thread] | Current Thread | [Next in Thread] |