summaryrefslogtreecommitdiff
path: root/src/Propellor/Git.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-23 18:49:33 -0400
committerJoey Hess2014-11-23 18:49:33 -0400
commitf14749c1ccdaeb76beee74381d86f0bc4bc76b09 (patch)
tree5cff1489e97022ad227de288e470acfe0128df5c /src/Propellor/Git.hs
parent1695f5c678e5e64bc12252ee5b8ed75d1c5b5c49 (diff)
parent9d975e9ee4c44782da0815fb161ea8676dbf559c (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Git.hs')
-rw-r--r--src/Propellor/Git.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Git.hs b/src/Propellor/Git.hs
index ccf97b94..34bc43e2 100644
--- a/src/Propellor/Git.hs
+++ b/src/Propellor/Git.hs
@@ -10,8 +10,13 @@ getCurrentBranch :: IO String
getCurrentBranch = takeWhile (/= '\n')
<$> readProcess "git" ["symbolic-ref", "--short", "HEAD"]
+getCurrentBranchRef :: IO String
+getCurrentBranchRef = takeWhile (/= '\n')
+ <$> readProcess "git" ["symbolic-ref", "HEAD"]
+
getCurrentGitSha1 :: String -> IO String
-getCurrentGitSha1 branchref = readProcess "git" ["show-ref", "--hash", branchref]
+getCurrentGitSha1 branchref = takeWhile (/= '\n')
+ <$> readProcess "git" ["show-ref", "--hash", branchref]
setRepoUrl :: String -> IO ()
setRepoUrl "" = return ()