devblog
This commit is contained in:
parent
ead09207ca
commit
4fcf65cda3
5 changed files with 22 additions and 3 deletions
|
@ -52,11 +52,17 @@ cmd = [withOptions syncOptions $
|
||||||
seek SectionCommon "synchronize local repository with remotes"]
|
seek SectionCommon "synchronize local repository with remotes"]
|
||||||
|
|
||||||
syncOptions :: [Option]
|
syncOptions :: [Option]
|
||||||
syncOptions = [ contentOption ]
|
syncOptions =
|
||||||
|
[ contentOption
|
||||||
|
, messageOption
|
||||||
|
]
|
||||||
|
|
||||||
contentOption :: Option
|
contentOption :: Option
|
||||||
contentOption = flagOption [] "content" "also transfer file contents"
|
contentOption = flagOption [] "content" "also transfer file contents"
|
||||||
|
|
||||||
|
messageOption :: Option
|
||||||
|
messageOption = fieldOption ['m'] "message" "MSG" "specify commit message"
|
||||||
|
|
||||||
seek :: CommandSeek
|
seek :: CommandSeek
|
||||||
seek rs = do
|
seek rs = do
|
||||||
prepMerge
|
prepMerge
|
||||||
|
@ -139,6 +145,8 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted )
|
||||||
|
|
||||||
commit :: CommandStart
|
commit :: CommandStart
|
||||||
commit = next $ next $ do
|
commit = next $ next $ do
|
||||||
|
commitmessage <- fromMaybe "git-annex automatic sync"
|
||||||
|
<$> Annex.getField (optionName messageOption)
|
||||||
showStart "commit" ""
|
showStart "commit" ""
|
||||||
Annex.Branch.commit "update"
|
Annex.Branch.commit "update"
|
||||||
ifM isDirect
|
ifM isDirect
|
||||||
|
@ -154,8 +162,6 @@ commit = next $ next $ do
|
||||||
]
|
]
|
||||||
return True
|
return True
|
||||||
)
|
)
|
||||||
where
|
|
||||||
commitmessage = "git-annex automatic sync"
|
|
||||||
|
|
||||||
commitStaged :: Git.Branch.CommitMode -> String -> Annex Bool
|
commitStaged :: Git.Branch.CommitMode -> String -> Annex Bool
|
||||||
commitStaged commitmode commitmessage = go =<< inRepo Git.Branch.currentUnsafe
|
commitStaged commitmode commitmessage = go =<< inRepo Git.Branch.currentUnsafe
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -5,6 +5,7 @@ git-annex (5.20150114) UNRELEASED; urgency=medium
|
||||||
on the remote, and their size. This is rather expensive to calculate,
|
on the remote, and their size. This is rather expensive to calculate,
|
||||||
so comes last and --fast will disable it.
|
so comes last and --fast will disable it.
|
||||||
* Git remote info now includes the date of the last sync with the remote.
|
* 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
|
-- Joey Hess <id@joeyh.name> Tue, 13 Jan 2015 17:03:39 -0400
|
||||||
|
|
||||||
|
|
9
doc/devblog/day_246__old_todos.mdwn
Normal file
9
doc/devblog/day_246__old_todos.mdwn
Normal file
|
@ -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`.
|
|
@ -174,6 +174,8 @@ subdirectories).
|
||||||
This behavior can be overridden by configuring the preferred content of
|
This behavior can be overridden by configuring the preferred content of
|
||||||
a repository. See see PREFERRED CONTENT below.
|
a repository. See see PREFERRED CONTENT below.
|
||||||
|
|
||||||
|
The `--message` or `-m` option can be used to specify a commit message.
|
||||||
|
|
||||||
* `merge`
|
* `merge`
|
||||||
|
|
||||||
This performs the same merging (and merge conflict resolution)
|
This performs the same merging (and merge conflict resolution)
|
||||||
|
|
|
@ -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.
|
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]]
|
||||||
|
|
Loading…
Reference in a new issue