[Nix-dev] Git commit hashes

Colin Putney colin at wiresong.com
Tue Jun 2 18:19:29 CEST 2015


On Tue, Jun 2, 2015 at 9:15 AM, Colin Putney <colin at wiresong.com> wrote:

> Hi all,
>
> I'm running a small cluster with several custom-built services, and I'd
> like to include git commit hashes in my logs so that I can easily find the
> source code that's producing them. I thought this would be
> straight-forward, but it's turning out to be surprisingly difficult.
>
> Running `git describe`
>

Ugh, premature send. Sorry.

In principle, including the git hash in the output of a build should be
deterministic: for any given working copy, there is one and only one commit
hash. In practice, though, running git describe without introducing
impurity seems to be impossible. Anybody figured out how to do this?

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150602/a52edb4b/attachment.html 


More information about the nix-dev mailing list