aboutsummaryrefslogtreecommitdiff
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
parent01e8a0a9e5de13b4c1f5baa5d44e8898692f62e4 (diff)
reorder git-union-merge params
-rw-r--r--doc/git-union-merge.mdwn4
-rw-r--r--git-union-merge.hs8
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/git-union-merge.mdwn b/doc/git-union-merge.mdwn
index 0322641ef..495612f36 100644
--- a/doc/git-union-merge.mdwn
+++ b/doc/git-union-merge.mdwn
@@ -4,7 +4,7 @@ git-union-merge - Join branches together using a union merge
# SYNOPSIS
-git union-merge newref ref ref
+git union-merge ref ref newref
# DESCRIPTION
@@ -20,7 +20,7 @@ entirely on git refs and branches.
# EXAMPLE
- git union-merge refs/heads/git-annex git-annex origin/git-annex
+ git union-merge git-annex origin/git-annex refs/heads/git-annex
Merges the current git-annex branch, and a version from origin,
storing the result in the git-annex branch.
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. -}