threads / discuss / 15782

Question: How to list files that haven't been modified?

Subject: Question: How to list files that haven't been modified?

## tl;dr

2 messages between Oct 4, 2008 and Oct 4, 2008.

replies: 1people: 2as markdown or json

Mark Burton· Oct 4, 2008, 20:07 UTC · lore
Hi,

It's still early days for me and I haven't yet discovered how to ask git to list all the files in a tree that don't have pending modifications (staged or not). I have read about ls-files but it doesn't seem to offer that option. As far as I can tell, it can list the files known to git and the files that have been modified but not the difference between those sets.

Thanks,
Mark
Elijah Newren· Oct 4, 2008, 23:01 UTC · re: Mark Burton · lore

Re: Question: How to list files that haven't been modified?

On Sat, Oct 4, 2008 at 2:07 PM, Mark Burton <markb@ordern.com> wrote:
Show 8 quoted lines
>
> Hi,
>
> It's still early days for me and I haven't yet discovered how to ask git to list
> all the files in a tree that don't have pending modifications (staged or not). I
> have read about ls-files but it doesn't seem to offer that option. As far as I
> can tell, it can list the files known to git and the files that have been
> modified but not the difference between those sets.
You could manually construct the difference between the lists:
$ comm -3 <(git ls-files) <(git ls-files --modified)

← back to recent threads