summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-01 15:16:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-01 15:23:48 -0400
commitda2a94862d24edf7f63e59c9797c054db556a53a (patch)
tree4a3713d97ae051f3ebecb56849ab591ae249cc19 /Git
parent5aaa2c1a5d9c78932409105cf84c1a712a0ada06 (diff)
Disable receive.denyNonFastForwards when setting up a gcrypt special remote
gcrypt needs to be able to fast-forward the master branch. If a git repository is set up with git init --shared --bare, it gets that set, and pushing to it will then fail, even when it's up-to-date.
Diffstat (limited to 'Git')
-rw-r--r--Git/Config.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Git/Config.hs b/Git/Config.hs
index db795b7a7..a41712add 100644
--- a/Git/Config.hs
+++ b/Git/Config.hs
@@ -177,3 +177,14 @@ fromFile r f = fromPipe r "git"
, File f
, Param "--list"
]
+
+{- Changes a git config setting in the specified config file.
+ - (Creates the file if it does not already exist.) -}
+changeFile :: FilePath -> String -> String -> IO Bool
+changeFile f k v = boolSystem "git"
+ [ Param "config"
+ , Param "--file"
+ , File f
+ , Param k
+ , Param v
+ ]