On 11/11/2023 10:03 PM, Eli Zaretskii wrote: >> Date: Sun, 12 Nov 2023 00:00:13 +0200 >> Cc: 67062@debbugs.gnu.org >> From: Dmitry Gutov >> >> Our general approach is to prefer global options and dynamic dispatch on >> backends, resorting to using per-backend options when it's much easier >> to do. > > Which I think is the case here. What other VC backend has such long > revision strings? I couldn't think of any. Game of Trees[1] is one, though you could argue that that's cheating because it uses the Git repository format. It does have a GNU ELPA package though, so the author would probably want to add a 'vc-got-short-revision' function. (Or something similar depending on what this patch looks like if/when it merges.) Looking at some GoT repositories, they *do* still use the long SHA-1 hashes for revision identifiers. In fact, there are at least a couple Git-compatible VCSes now. Facebook wrote one called "Sapling", though I haven't used it. Based on some screenshots at least, it looks like Sapling also uses SHA-1 hashes for revision IDs. In any case, we don't necessarily need to provide a default implementation for the 'short-revision' function. What about something like this? I'm not sure it's better, but it does let us avoid defining a no-op implementation for the "default backend". [1] https://gameoftrees.org/index.html [2] https://github.com/facebook/sapling