GNU bug report logs -
#21383
Static revisions in vc-working-revision
Previous Next
Reported by: Jonathan H <pythonnut <at> gmail.com>
Date: Mon, 31 Aug 2015 00:47:01 UTC
Severity: wishlist
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello all!
I've attached a basic patch that adds an option to vc-working-revision. The
option is named *concrete* and if non-nil, it forces vc-working-revision to
return a revision name that will not go stale after new revisions are made.
This is useful for, e.g. git, where vc-working-revision will just return
the branch name, which only refers to the current commit for as long as
it's the head of the branch.
I'm using this in diff-hl #33 <https://github.com/dgutov/diff-hl/issues/33>to
determine when to refresh the current VC highlighting.
I've supplied an implementation for Git, and no-op implementations for all
the other backends. For most systems (i.e. all the other VCS systems I
know), the value of *concrete *does not matter. If you know a backend that
would benefit from a real implementation, please let me know.
Also, this is my first patch, so I'm not entirely sure I've got all my
ducks in a row. Any comments on that would be great too.
Thanks,
Jonathan
[Message part 2 (text/html, inline)]
[0001-Add-CONCRETE-parameter-to-vc-working-revision.patch (application/octet-stream, attachment)]
This bug report was last modified 9 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.