diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-16 15:11:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-05-16 15:11:14 -0400 |
commit | 3b33e39dbd444ccada4598598abc6da40880d9e6 (patch) | |
tree | 34d14d1bd9626b150635a068068e180666525f8f /Annex | |
parent | 8e9a8b42470e979fdf9aef9c87b2d7d36aa89c64 (diff) |
move keys db closure to AutoMerge
This makes git-annex sync also do it, which makes sure that the keys db
info is fresh when doing a sync --content.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/AutoMerge.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs index 26f58a98e..06efdb7f5 100644 --- a/Annex/AutoMerge.hs +++ b/Annex/AutoMerge.hs @@ -52,8 +52,15 @@ autoMergeFrom branch currbranch mergeconfig commitmode = do where go old = ifM isDirect ( mergeDirect currbranch old branch (resolveMerge old branch False) mergeconfig commitmode - , inRepo (Git.Merge.merge branch mergeconfig commitmode) - <||> (resolveMerge old branch False <&&> commitResolvedMerge commitmode) + , do + r <- inRepo (Git.Merge.merge branch mergeconfig commitmode) + <||> (resolveMerge old branch False <&&> commitResolvedMerge commitmode) + -- Merging can cause new associated files to appear + -- and the smudge filter will add them to the database. + -- To ensure that this process sees those changes, + -- close the database if it was open. + Database.Keys.closeDb + return r ) {- Resolves a conflicted merge. It's important that any conflicts be |