From: Knut Franke Date: Fri, 03 Sep 2010 09:43:08 GMT Subject: Re: simple example for git hooks Message-ID: <201009031143.10539.k.franke@science-computing.de> In-Reply-To: On Friday 03 September 2010 00:54:44 Gelonida wrote: > ok, so it seems what I'm missing is THE command to list all added / > modified files > I could of course use > > git status > > and parse its output, but this is probably not the right way to do. Not unless you use the --porcelain option, which is explicitly meant to produce parsable output. For instance, if "a" has staged modifications, "b" has unstaged modifications and "c" is added (and staged), you'll get $ git status --porcelain M a M b A c i.e. the first character in a line denotes the difference between HEAD and index and the second character denotes the difference between index and working copy. -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196