Popularity
8.0
Growing
Activity
1.6
-
32
4
12

Monthly Downloads: 223
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Development    
Latest version: v1.2.0

githash alternatives and similar packages

Based on the "Development" category.
Alternatively, view githash alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of githash or a related project?

Add another 'Development' Package

README

githash

Build Status

Some handy Template Haskell splices for including the current git hash and branch in the code of your project. Useful for including in panic messages, --version output, or diagnostic info for more informative bug reports.

Most of the complication in the GitHash module is due to the various places the current git hash might be stored:

  1. Detached HEAD: the hash is in .git/HEAD
  2. On a branch or tag: the hash is in a file pointed to by .git/HEAD in a location like .git/refs/heads
  3. On a branch or tag but in a repository with packed refs: the hash is in .git/packed-refs

These situations all arise under normal development workflows, but there might be further scenarios that cause problems. Let me know if you run into them!