[Top][All Lists]

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

Re: How to get a list of changed files with VC?

From: Dmitry Gutov
Subject: Re: How to get a list of changed files with VC?
Date: Sat, 15 Jul 2017 20:41:29 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0

On 7/13/17 4:23 AM, Michael Heerdegen wrote:

More specific questions about my implementation:

1.  The implementation of the first function
`el-search--changed-files-in-repo' is currently git-specific, but I
didn't find a way to implement it with functions that VC defines to make
it work for other version control systems.  Any idea?

For the changed files relative to HEAD, you can call the backend command (with vc-call-backend) named dir-status-files. But there is no way to specify the reference revision. Maybe calling the VC backend diff command on the whole repo and parsing the output could work.

2.  The second function `el-search--file-changed-p' doesn't have this
problem.  However, I gained it from trial and error.  Does the
implementation make sense?  How can I avoid binding vc-git-diff-switches
-> nil (I get an error for some files if I don't).
I'll need some more details to answer this.

reply via email to

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