diff options
Diffstat (limited to 'Git/Merge.hs')
-rw-r--r-- | Git/Merge.hs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Git/Merge.hs b/Git/Merge.hs index 948e09e01..d661db978 100644 --- a/Git/Merge.hs +++ b/Git/Merge.hs @@ -1,6 +1,6 @@ {- git merging - - - Copyright 2012 Joey Hess <joey@kitenet.net> + - Copyright 2012, 2014 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} @@ -19,3 +19,15 @@ mergeNonInteractive branch | otherwise = merge [Param "--no-edit", Param $ fromRef branch] where merge ps = runBool $ Param "merge" : ps + +{- Stage the merge into the index, but do not commit it.-} +stageMerge :: Ref -> Repo -> IO Bool +stageMerge branch = runBool + [ Param "merge" + , Param "--quiet" + , Param "--no-commit" + -- Without this, a fast-forward merge is done, since it involves no + -- commit. + , Param "--no-ff" + , Param $ fromRef branch + ] |