aboutsummaryrefslogtreecommitdiff
path: root/Git/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-05 15:31:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-05 15:41:24 -0400
commitda9eea5dc0e86b4abb14064346eddc5689d94333 (patch)
tree6da412083ff594f3fa2abbe2d0b8b450346e77dd /Git/Config.hs
parent8bb9d23f521582e51ceaee03d1aa5084cad3de08 (diff)
automatically set and unset core.bare when switching to/from direct mode
Diffstat (limited to 'Git/Config.hs')
-rw-r--r--Git/Config.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Git/Config.hs b/Git/Config.hs
index a41712add..1919ecedf 100644
--- a/Git/Config.hs
+++ b/Git/Config.hs
@@ -153,7 +153,10 @@ boolConfig True = "true"
boolConfig False = "false"
isBare :: Repo -> Bool
-isBare r = fromMaybe False $ isTrue =<< getMaybe "core.bare" r
+isBare r = fromMaybe False $ isTrue =<< getMaybe coreBare r
+
+coreBare :: String
+coreBare = "core.bare"
{- Runs a command to get the configuration of a repo,
- and returns a repo populated with the configuration, as well as the raw