Re: how-to get commit content with pre-receive hook ?

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

 



>>
>> But I don't know how to get the *content* of the file being submitted to run
>> my syntax check rules against it !
>>

>     git log -p <old>..<new>
>     git diff <old>..<new>

or in case of the tool requiring a full worktree

    mkdir /tmp/test
    GIT_WORKTREE=/tmp/test git checkout -f <new>
    and then perform the check on that full tree?



[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]