add merge subcommand

This commit is contained in:
Joey Hess 2011-06-22 18:46:45 -04:00
parent 80302d0b46
commit ad3770e0b2
5 changed files with 42 additions and 5 deletions

29
Command/Merge.hs Normal file
View file

@ -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

View file

@ -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]

View file

@ -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

3
debian/changelog vendored
View file

@ -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.

View file

@ -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