File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed
Cabal/src/Distribution/Simple
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -311,16 +311,18 @@ cabalVersion = mkVersion [3,0] --used when bootstrapping
311
311
312
312
-- |
313
313
-- `Cabal` Git information. Only filled in if built in a Git tree in
314
- -- developmnent mode and Template Haskell is available.
314
+ -- development mode and Template Haskell is available.
315
315
cabalGitInfo :: String
316
316
#ifdef GIT_REV
317
- cabalGitInfo = concat [ " (commit "
318
- , giHash'
319
- , branchInfo
320
- , " , "
321
- , either (const " " ) giCommitDate gi'
322
- , " )"
323
- ]
317
+ cabalGitInfo = if giHash' == " "
318
+ then " "
319
+ else concat [ " (commit "
320
+ , giHash'
321
+ , branchInfo
322
+ , " , "
323
+ , either (const " " ) giCommitDate gi'
324
+ , " )"
325
+ ]
324
326
where
325
327
gi' = $$ tGitInfoCwdTry
326
328
giHash' = take 7 . either (const " " ) giHash $ gi'
Original file line number Diff line number Diff line change @@ -33,13 +33,15 @@ cabalInstallVersion = mkVersion' PackageInfo.version
33
33
-- developmnent mode and Template Haskell is available.
34
34
cabalInstallGitInfo :: String
35
35
#ifdef GIT_REV
36
- cabalInstallGitInfo = concat [ " (commit "
37
- , giHash'
38
- , branchInfo
39
- , " , "
40
- , either (const " " ) giCommitDate gi'
41
- , " )"
42
- ]
36
+ cabalInstallGitInfo = if giHash' == " "
37
+ then " "
38
+ else concat [ " (commit "
39
+ , giHash'
40
+ , branchInfo
41
+ , " , "
42
+ , either (const " " ) giCommitDate gi'
43
+ , " )"
44
+ ]
43
45
where
44
46
gi' = $$ tGitInfoCwdTry
45
47
giHash' = take 7 . either (const " " ) giHash $ gi'
You can’t perform that action at this time.
0 commit comments