summaryrefslogtreecommitdiff
path: root/src/Propellor/Git.hs
diff options
context:
space:
mode:
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 ()