# list all dirty files in working directory

4 messages from 2005-05-05 to 2005-05-06. Participants: Thomas Glanzmann, Andreas Gal, Linus Torvalds.
Thread: https://gitlist.dev/t/491

## Thomas Glanzmann, 2005-05-05 21:21

Subject: list all dirty files in working directory
Message-ID: <20050505212152.GP20994@cip.informatik.uni-erlangen.de>
URL: https://gitlist.dev/e/20050505212152.GP20994%40cip.informatik.uni-erlangen.de

```
Hello,
is there another way than call 'checkout-cache -a' and parse the output?
Maybe a command which lists one dirty file per line?

	Thomas

```

## Thomas Glanzmann, 2005-05-05 21:32

Subject: Re: list all dirty files in working directory
Message-ID: <20050505213256.GQ20994@cip.informatik.uni-erlangen.de>
URL: https://gitlist.dev/e/20050505213256.GQ20994%40cip.informatik.uni-erlangen.de
In-Reply-To: <20050505212152.GP20994@cip.informatik.uni-erlangen.de>

```
Hello,

* Thomas Glanzmann <sithglan@stud.uni-erlangen.de> [050505 23:24]:
> is there another way than call 'checkout-cache -a' and parse the output?
> Maybe a command which lists one dirty file per line?

of course I meant parsing the output of 'update-cache --refresh'.

	Thomas

```

## Andreas Gal, 2005-05-05 21:35

Subject: Re: list all dirty files in working directory
Message-ID: <Pine.LNX.4.58.0505051433190.8745@sam.ics.uci.edu>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0505051433190.8745%40sam.ics.uci.edu
In-Reply-To: <20050505212152.GP20994@cip.informatik.uni-erlangen.de>

```

git-update-cache --refresh | while read line; do
    echo $line | cut -d ':' -f 1
done

That should give you one file per line, for every dirty file. 

Andreas

On Thu, 5 May 2005, Thomas Glanzmann wrote:

> Hello,
> is there another way than call 'checkout-cache -a' and parse the output?
> Maybe a command which lists one dirty file per line?
> 
> 	Thomas
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

```

## Linus Torvalds, 2005-05-06 02:06

Subject: Re: list all dirty files in working directory
Message-ID: <Pine.LNX.4.58.0505051905200.2328@ppc970.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0505051905200.2328%40ppc970.osdl.org
In-Reply-To: <20050505212152.GP20994@cip.informatik.uni-erlangen.de>

```


On Thu, 5 May 2005, Thomas Glanzmann wrote:
>
> is there another way than call 'checkout-cache -a' and parse the output?
> Maybe a command which lists one dirty file per line?

A simple

	git-diff-files

does what I think you want.

Of course, it does a lot more too, but part of the deal is that you get to 
know which files are dirty.

		Linus

```
