diff --git a/Command/Merge.hs b/Command/Merge.hs new file mode 100644 index 0000000000..04328e8c5a --- /dev/null +++ b/Command/Merge.hs @@ -0,0 +1,29 @@ +{- git-annex command + - + - Copyright 2011 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Command.Merge where + +import Command +import qualified Branch +import Messages + +command :: [Command] +command = [repoCommand "merge" paramNothing seek + "auto-merges remote changes into the git-annex branch"] + +seek :: [CommandSeek] +seek = [withNothing start] + +start :: CommandStartNothing +start = do + showStart "merge" "." + next perform + +perform :: CommandPerform +perform = do + Branch.update + next $ return True diff --git a/Command/Status.hs b/Command/Status.hs index 1a7f694ba8..3b096d9793 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -47,7 +47,7 @@ sizeList :: [a] -> SizeList a sizeList l = (l, genericLength l) command :: [Command] -command = [repoCommand "status" (paramNothing) seek +command = [repoCommand "status" paramNothing seek "shows status information about the annex"] seek :: [CommandSeek] diff --git a/GitAnnex.hs b/GitAnnex.hs index 103ee262f2..727e0c3961 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -39,6 +39,7 @@ import qualified Command.Lock import qualified Command.PreCommit import qualified Command.Find import qualified Command.Whereis +import qualified Command.Merge import qualified Command.Status import qualified Command.Migrate import qualified Command.Uninit @@ -76,6 +77,7 @@ cmds = concat , Command.DropUnused.command , Command.Find.command , Command.Whereis.command + , Command.Merge.command , Command.Status.command , Command.Migrate.command , Command.Map.command diff --git a/debian/changelog b/debian/changelog index a76a0534e2..03ccbe03f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ git-annex (0.20110611) UNRELEASED; urgency=low * New repository format, annex.version=3. Use `git annex upgrade` to migrate. - + * git-annex now stores its logs in a git-annex branch. + * merge: New subcommand. Auto-merges the new git-annex branch. * Improved handling of bare git repos with annexes. Many more commands will work in them. * rsync is now used when copying files from repos on other filesystems. diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index ced6fc1b3a..1cb079ae9a 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -182,6 +182,13 @@ Many git-annex commands will stage changes for later `git commit` by you. Displays a list of repositories known to contain the content of the specified file or files. +* merge + + Automatically merges any changes from remotes into the git-annex branch. + While git-annex mostly handles keeping the git-annex branch merged + automatically, if you find you are unable to push the git-annex branch + due non-fast-forward, this will fix it. + * status Displays some statistics and other information, including how much data @@ -301,9 +308,7 @@ Many git-annex commands will stage changes for later `git commit` by you. * upgrade - Upgrades the repository to current layout. Upgrades are done automatically - whenever a newer git annex encounters an old repository; this command - allows explcitly starting an upgrade. + Upgrades the repository to current layout. * version