refactor getCurrentBranch
Both Command.Sync and Annex.Ingest had their own versions of this. The one in Annex.Ingest used Git.Branch.currentUnsafe, but does not seem to need it. That is only checking to see if it's in an adjusted unlocked branch, and when in an adjusted branch, the branch does in fact exist, so the added check that Git.Branch.current does is fine. This commit was sponsored by Denis Dzyubenko on Patreon.
This commit is contained in:
parent
c94e62cab5
commit
8be5a7269a
15 changed files with 228 additions and 169 deletions
|
@ -11,7 +11,8 @@ import Command
|
|||
import qualified Annex
|
||||
import Git.Types
|
||||
import Annex.UpdateInstead
|
||||
import Command.Sync (mergeLocal, prepMerge, mergeConfig, getCurrBranch)
|
||||
import Annex.CurrentBranch
|
||||
import Command.Sync (mergeLocal, prepMerge, mergeConfig)
|
||||
|
||||
-- This does not need to modify the git-annex branch to update the
|
||||
-- work tree, but auto-initialization might change the git-annex branch.
|
||||
|
@ -48,4 +49,4 @@ fixPostReceiveHookEnv = do
|
|||
updateInsteadEmulation :: CommandStart
|
||||
updateInsteadEmulation = do
|
||||
prepMerge
|
||||
mergeLocal mergeConfig def =<< join getCurrBranch
|
||||
mergeLocal mergeConfig def =<< getCurrentBranch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue