How to get the list of modified files in VC?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to get the list of modified files in VC?

Marcin Borkowski-3
Hi there,

I'm writing some code on top of VC.  I'd need to get the list of
modified files in the current repository.  How do I do that (other than
firing git as an external process)?

TIA,

--
Marcin Borkowski

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get the list of modified files in VC?

Eli Zaretskii
> From: Marcin Borkowski <[hidden email]>
> Date: Tue, 25 Jul 2017 07:32:50 +0200
>
> I'm writing some code on top of VC.  I'd need to get the list of
> modified files in the current repository.  How do I do that (other than
> firing git as an external process)?

I suggest to look at what vc-dir-refresh does, I'm sure some variant
of that is what you want.  The back-end call 'dir-status-files' is the
backbone of this.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get the list of modified files in VC?

Marcin Borkowski-3
In reply to this post by Marcin Borkowski-3

On 2017-07-25, at 13:41, Adam Taylor <[hidden email]> wrote:

> There are the magit functions: magit-staged-files and magit-unstaged-files
> might fit the bill.

Thanks, but I'd really prefer to stay within VC this time (while I do
have Magit, I cannot assume other people do, and I'm writing something
not only for myself).

Still, I'm cc'ing this to the list in case someone might find it useful.

Thanks,

--
Marcin Borkowski

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get the list of modified files in VC?

Marcin Borkowski-3
In reply to this post by Eli Zaretskii

On 2017-07-25, at 16:26, Eli Zaretskii <[hidden email]> wrote:

>> From: Marcin Borkowski <[hidden email]>
>> Date: Tue, 25 Jul 2017 07:32:50 +0200
>>
>> I'm writing some code on top of VC.  I'd need to get the list of
>> modified files in the current repository.  How do I do that (other than
>> firing git as an external process)?
>
> I suggest to look at what vc-dir-refresh does, I'm sure some variant
> of that is what you want.  The back-end call 'dir-status-files' is the
> backbone of this.

Thanks, but I still have questions.  I learned about
vc-BACKEND-dir-status-files functions, but I don't really understand how
to use one.  And they are not extremely well documented...

This is not a huge problem - I can always just run git directly - but
I wanted to do it "the right way";-).

Best,

--
Marcin Borkowski

Loading...