diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-01-05 13:30:44 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-01-05 13:30:44 -0400 |
| commit | 8ba897e12f6e35e30162cee3a3ea16ba67f66b0d (patch) | |
| tree | 44280a15ebc0fc5e543216e898bad9ec5d80dc39 /src | |
| parent | 6a889ff04faf68d35e035a464ac01a7a96bde3e2 (diff) | |
| parent | 9eb4c127dd8cfd351f4e39931162b324781df53d (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Git.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Propellor/Property/Git.hs b/src/Propellor/Property/Git.hs index 46f6abc7..a5ef5ab1 100644 --- a/src/Propellor/Property/Git.hs +++ b/src/Propellor/Property/Git.hs @@ -149,3 +149,14 @@ repoAcceptsNonFFs repo = accepts <!> refuses refuses = repoConfigured repo ("receive.denyNonFastForwards", "true") `describe` desc "rejects" desc s = "git repo " ++ repo ++ " " ++ s ++ " non-fast-forward pushes" + +-- | Sets a bare repository's default branch, which will be checked out +-- when cloning it. +bareRepoDefaultBranch :: FilePath -> String -> Property NoInfo +bareRepoDefaultBranch repo branch = + userScriptProperty (User "root") + [ "cd " ++ repo + , "git symbolic-ref HEAD refs/heads/" ++ branch + ] + `changesFileContent` (repo </> "HEAD") + `describe` ("git repo at " ++ repo ++ " has default branch " ++ branch) |
