summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2014-04-22 20:28:59 +0200
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2014-04-22 20:28:59 +0200
commit7e2e5efe6f339f0d3ee30057aee16873a0e97383 (patch)
treef869b68a6723670f31de78b709af6d7916655e87 /compiler
parent49ce36a6573afdc638b825ffb704598b635a01c8 (diff)
downloadNim-7e2e5efe6f339f0d3ee30057aee16873a0e97383.tar.gz
Adds git hash to compiler's version switch. Refs #1119.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/commands.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 366019c19..e920cc897 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -74,6 +74,11 @@ proc writeVersionInfo(pass: TCmdLinePass) =
     msgWriteln(`%`(HelpMessage, [VersionAsString, 
                                  platform.OS[platform.hostOS].name, 
                                  CPU[platform.hostCPU].name]))
+
+    const gitHash = gorge("git log -n 1 --format=%H")
+    if gitHash.strip.len == 40:
+      msgWriteln("git hash: " & gitHash)
+
     msgWriteln("active boot switches:" & usedRelease & usedAvoidTimeMachine &
       usedTinyC & usedGnuReadline & usedNativeStacktrace & usedNoCaas &
       usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedNoGC)