diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 18:46:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 18:46:56 -0400 |
commit | ad3770e0b203b32a07fa142d6d83c980b23310ee (patch) | |
tree | d07022b5d9b7628701a737e3d3042680e2998770 | |
parent | 80302d0b46c5d45df1cf290796e0e27d9264ece8 (diff) |
add merge subcommand
-rw-r--r-- | Command/Merge.hs | 29 | ||||
-rw-r--r-- | Command/Status.hs | 2 | ||||
-rw-r--r-- | GitAnnex.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 11 |
5 files changed, 42 insertions, 5 deletions
diff --git a/Command/Merge.hs b/Command/Merge.hs new file mode 100644 index 000000000..04328e8c5 --- /dev/null +++ b/Command/Merge.hs @@ -0,0 +1,29 @@ +{- git-annex command + - + - Copyright 2011 Joey Hess <joey@kitenet.net> + - + - 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 1a7f694ba..3b096d979 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 103ee262f..727e0c396 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 a76a0534e..03ccbe03f 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 ced6fc1b3..1cb079ae9 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 |