diff options
author | 2015-01-13 18:36:17 -0400 | |
---|---|---|
committer | 2015-01-13 18:36:17 -0400 | |
commit | 3e0c966e1da392b5c9ecdbb0e0a115088a784b15 (patch) | |
tree | 2262951b1f82d792f8942bdaac4cc505c2cff8d4 | |
parent | e8c8e506d696173512dd134766c9d7fc8ea63c32 (diff) |
devblog
-rw-r--r-- | Command/Sync.hs | 12 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/devblog/day_246__old_todos.mdwn | 9 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 2 | ||||
-rw-r--r-- | doc/todo/wishlist:___96__git_annex_sync_-m__96__.mdwn | 1 |
5 files changed, 22 insertions, 3 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 0433153b1..5ecd0745a 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -52,11 +52,17 @@ cmd = [withOptions syncOptions $ seek SectionCommon "synchronize local repository with remotes"] syncOptions :: [Option] -syncOptions = [ contentOption ] +syncOptions = + [ contentOption + , messageOption + ] contentOption :: Option contentOption = flagOption [] "content" "also transfer file contents" +messageOption :: Option +messageOption = fieldOption ['m'] "message" "MSG" "specify commit message" + seek :: CommandSeek seek rs = do prepMerge @@ -139,6 +145,8 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted ) commit :: CommandStart commit = next $ next $ do + commitmessage <- fromMaybe "git-annex automatic sync" + <$> Annex.getField (optionName messageOption) showStart "commit" "" Annex.Branch.commit "update" ifM isDirect @@ -154,8 +162,6 @@ commit = next $ next $ do ] return True ) - where - commitmessage = "git-annex automatic sync" commitStaged :: Git.Branch.CommitMode -> String -> Annex Bool commitStaged commitmode commitmessage = go =<< inRepo Git.Branch.currentUnsafe diff --git a/debian/changelog b/debian/changelog index 0db52be87..a9b3ffb68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ git-annex (5.20150114) UNRELEASED; urgency=medium on the remote, and their size. This is rather expensive to calculate, so comes last and --fast will disable it. * Git remote info now includes the date of the last sync with the remote. + * sync: Added --message/-m option like git commit. -- Joey Hess <id@joeyh.name> Tue, 13 Jan 2015 17:03:39 -0400 diff --git a/doc/devblog/day_246__old_todos.mdwn b/doc/devblog/day_246__old_todos.mdwn new file mode 100644 index 000000000..6957cff52 --- /dev/null +++ b/doc/devblog/day_246__old_todos.mdwn @@ -0,0 +1,9 @@ +Got a release out today. + +I'm feeling a little under the weather, so wanted something easy to do in +the rest of the day that would be nice and constructive. Ended up going +over the todo list. Old todos come in three groups; hard problems, already +solved, and easy changes that never got done. I left the first group alone, +closed many todos in the second group, and implemented a few easy changes. +Including `git annex sync -m` and adding some more info to `git annex info +remote`. diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index 74ce72137..b8ad6a1d6 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -174,6 +174,8 @@ subdirectories). This behavior can be overridden by configuring the preferred content of a repository. See see PREFERRED CONTENT below. + The `--message` or `-m` option can be used to specify a commit message. + * `merge` This performs the same merging (and merge conflict resolution) diff --git a/doc/todo/wishlist:___96__git_annex_sync_-m__96__.mdwn b/doc/todo/wishlist:___96__git_annex_sync_-m__96__.mdwn index 92b5dee27..c83d4db5c 100644 --- a/doc/todo/wishlist:___96__git_annex_sync_-m__96__.mdwn +++ b/doc/todo/wishlist:___96__git_annex_sync_-m__96__.mdwn @@ -8,3 +8,4 @@ works, if I run git annex should use that commit message instead of the default ones. That way, I could use [[sync]] directly and not be forced to commit prior to syncing just to make sure I have a useful commit message. +> [[fixed|done]] --[[Joey]] |