refactor
Better to not have a single function module, and better to have a more specific type than Bool. This commit was sponsored by Jack Hill on Patreon
This commit is contained in:
parent
3b34d123ed
commit
0be23bae2f
11 changed files with 23 additions and 44 deletions
|
@ -38,7 +38,6 @@ import qualified Database.Keys
|
|||
import qualified Command.Sync
|
||||
import Utility.Tuple
|
||||
import Utility.Metered
|
||||
import Config.CommitMode
|
||||
|
||||
import Data.Time.Clock
|
||||
import qualified Data.Set as S
|
||||
|
@ -231,7 +230,7 @@ commitStaged msg = do
|
|||
case v of
|
||||
Left _ -> return False
|
||||
Right _ -> do
|
||||
cmode <- implicitCommitMode
|
||||
cmode <- annexCommitMode <$> Annex.getGitConfig
|
||||
ok <- Command.Sync.commitStaged cmode msg
|
||||
when ok $
|
||||
Command.Sync.updateBranches =<< getCurrentBranch
|
||||
|
|
|
@ -14,12 +14,12 @@ import Assistant.Sync
|
|||
import Utility.DirWatcher
|
||||
import Utility.DirWatcher.Types
|
||||
import Annex.CurrentBranch
|
||||
import qualified Annex
|
||||
import qualified Annex.Branch
|
||||
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. -}
|
||||
|
@ -82,7 +82,7 @@ onChange file
|
|||
, "into", Git.fromRef b
|
||||
]
|
||||
void $ liftAnnex $ do
|
||||
cmode <- implicitCommitMode
|
||||
cmode <- annexCommitMode <$> Annex.getGitConfig
|
||||
Command.Sync.merge
|
||||
currbranch Command.Sync.mergeConfig
|
||||
def
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue