[Ecls-list] Question #1
Alexander Gavrilov
angavrilov at gmail.com
Mon Feb 15 21:10:13 UTC 2010
> The other problem is that maintaining this additional file implies quite
> some additional work and control on my side. I tried this before and did not
> succeed. An alternative is having hooks in .git that automatically upgrade
> the file, but so far I have been unable to achieve this: the hooks are run
> before commits, indeed, but they can not change the list of files that are
> committed.
The pre-commit hook is called before the actual commit process,
so it should be able to change the index (in fact, Git actually
expects that it might have). Not that it is necessarily a good idea.
> A final, perhaps better solution, would be to test for the existence of both
> the .git directory and the "git" program itself and encode the last commit
> date in a final version number. This would mean that users of releases or
> CVS would not get to see those extra release numbers.
Git itself uses this exact way, by means of calling the
following script from the makefile:
http://github.com/git/git/blob/master/GIT-VERSION-GEN
I think that it should be possible to adapt it to ECL if necessary.
Alexander
More information about the ecl-devel
mailing list