Added annex.allowsign option.

This commit was sponsored by Ilya Shlyakhter on Patreon.
This commit is contained in:
Joey Hess 2019-11-11 16:15:05 -04:00
parent 02a8573bf2
commit 3b34d123ed
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
13 changed files with 97 additions and 32 deletions

View file

@ -22,6 +22,7 @@ import Logs.PreferredContent
import qualified Annex.Branch
import Utility.Process.Transcript
import Config
import Config.CommitMode
{- Makes a new git repository. Or, if a git repository already
- exists, returns False. -}
@ -53,8 +54,9 @@ initRepo True primary_assistant_repo dir desc mgroup = inDir dir $ do
initRepo' desc mgroup
{- Initialize the master branch, so things that expect
- to have it will work, before any files are added. -}
unlessM (Git.Config.isBare <$> gitRepo) $
void $ inRepo $ Git.Branch.commitCommand Git.Branch.AutomaticCommit
unlessM (Git.Config.isBare <$> gitRepo) $ do
cmode <- implicitCommitMode
void $ inRepo $ Git.Branch.commitCommand cmode
[ Param "--quiet"
, Param "--allow-empty"
, Param "-m"

View file

@ -36,9 +36,9 @@ import qualified Annex
import Utility.InodeCache
import qualified Database.Keys
import qualified Command.Sync
import qualified Git.Branch
import Utility.Tuple
import Utility.Metered
import Config.CommitMode
import Data.Time.Clock
import qualified Data.Set as S
@ -231,7 +231,8 @@ commitStaged msg = do
case v of
Left _ -> return False
Right _ -> do
ok <- Command.Sync.commitStaged Git.Branch.AutomaticCommit msg
cmode <- implicitCommitMode
ok <- Command.Sync.commitStaged cmode msg
when ok $
Command.Sync.updateBranches =<< getCurrentBranch
return ok

View file

@ -19,6 +19,7 @@ import qualified Git
import qualified Git.Branch
import qualified Git.Ref
import qualified Command.Sync
import Config.CommitMode
{- This thread watches for changes to .git/refs/, and handles incoming
- pushes. -}
@ -80,11 +81,13 @@ onChange file
[ "merging", Git.fromRef changedbranch
, "into", Git.fromRef b
]
void $ liftAnnex $ Command.Sync.merge
currbranch Command.Sync.mergeConfig
def
Git.Branch.AutomaticCommit
changedbranch
void $ liftAnnex $ do
cmode <- implicitCommitMode
Command.Sync.merge
currbranch Command.Sync.mergeConfig
def
cmode
changedbranch
mergecurrent' _ = noop
{- Is the first branch a synced branch or remote tracking branch related