Subject: Re: Generate version file by hooks

From: Johannes Sixt <[email-masked]>
Date: Tue, 17 Mar 2009 17:54:57 +0100

Björn Hendriks schrieb:
> In fact my problem is not to find out the SHA1 of the last commit in a script 
> but to have that script called automatically each time git changes the 
> commit. My idea was to use the git hooks for that, but as I explained I 
> couldn't find hooks for all cases in which a commit changes.

In fact there are so many situations where the current commit changes. You
won't find enough hooks to catch all cases.

You better modify your build system to look for the current commit when it
is needed. That is *much* safer.

-- Hannes