git.iko.soy/typeable/gitrev
on master help sign in
add README
commit7316400a4d750a4c2bc7a68e134fcc6988939909 authorAdam C. Foltzer <acfoltzer@galois.com> dateTue 17 Mar 2015, 10:42 (12 years ago) parent0612da8
1 file changed+17
README.md+17
README.mdnew file+17
@@ -0,0 +1,17 @@
1+Some handy Template Haskell splices for including the current git hash
2+and branch in the code of your project. Useful for including in panic
3+messages, `--version` output, or diagnostic info for more informative
4+bug reports.
5+
6+Most of the complication in the `GitRev` module is due to the various
7+places the current git hash might be stored:
8+
9+1. Detached HEAD: the hash is in `.git/HEAD`
10+2. On a branch or tag: the hash is in a file pointed to by `.git/HEAD`
11+in a location like `.git/refs/heads`
12+3. On a branch or tag but in a repository with packed refs: the hash is
13+in `.git/packed-refs`
14+
15+These situations all arise under normal development workflows, but
16+there might be further scenarios that cause problems. Let me know if
17+you run into them!