aboutsummaryrefslogtreecommitdiff
path: root/git-union-merge.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-20 21:42:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-20 21:42:17 -0400
commit8b749d4bfdc81155e0dc17026f1575620bc132e1 (patch)
treeb9d2de38e697582543af67fb99fdb0073a2a7bef /git-union-merge.hs
parent01e8a0a9e5de13b4c1f5baa5d44e8898692f62e4 (diff)
reorder git-union-merge params
Diffstat (limited to 'git-union-merge.hs')
-rw-r--r--git-union-merge.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-union-merge.hs b/git-union-merge.hs
index 8e7e0367b..2a2570cf4 100644
--- a/git-union-merge.hs
+++ b/git-union-merge.hs
@@ -26,10 +26,10 @@ usage = error $ "bad parameters\n\n" ++ header
main :: IO ()
main = do
- [branch, aref, bref] <- parseArgs
+ [aref, bref, newref] <- parseArgs
g <- setup
stage g aref bref
- commit g branch aref bref
+ commit g aref bref newref
cleanup g
parseArgs :: IO [String]
@@ -103,13 +103,13 @@ stage g aref bref = do
{- Commits the index into the specified branch. -}
commit :: Git.Repo -> String -> String -> String -> IO ()
-commit g branch aref bref = do
+commit g aref bref newref = do
tree <- getSha "write-tree" $
pipeFrom "git" ["write-tree"]
sha <- getSha "commit-tree" $
pipeBoth "git" ["commit-tree", tree, "-p", aref, "-p", bref]
"union merge"
- Git.run g "update-ref" [Param branch, Param sha]
+ Git.run g "update-ref" [Param newref, Param sha]
{- Runs an action that causes a git subcommand to emit a sha, and strips
any trailing newline, returning the sha. -}