bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21383: Static revisions in vc-working-revision


From: Jonathan H
Subject: bug#21383: Static revisions in vc-working-revision
Date: Sun, 30 Aug 2015 17:45:25 -0700

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 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

Attachment: 0001-Add-CONCRETE-parameter-to-vc-working-revision.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]