Re: simple example for git hooks

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

 



Him
THanks a lot for your answer.

On 09/03/2010 12:49 AM, Ævar Arnfjörð Bjarmason wrote:
> On Thu, Sep 2, 2010 at 22:41, Gelonida <gelonida@xxxxxxxxx> wrote:
> 
>> Is there any clear documentation about hich git commands I'm allowed to
>> use during a trigger script and which ones I can't
> 
> It's just a program that's run at a certain point, and its exit status
> determines if git proceeds.
> 
> So you can use any git command, but of course what you might affect
> what's about to be commited.
> 
> For a pre-commit hook (IIRC) you should find the stuff to be commited
> in the index, finding a list of things that changed from a hook is
> just a matter of diffing HEAD against the contents of the index then.

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.

I use git for quite some time, but don't know many commands except
clone/pull/commit/reset/status/pull/push/cherrypick/rebase/tag/remote

thanks a lot for the typical way to identify added / modified files
and for fetching the commit comment



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]