narrow window where HEAD is detached
Updating an adjusted branch can take a while when there are a lot of files. HEAD was detached at the start, so if eg git-annex sync was interrupted at the wrong point, there was a possibly wide window where it would leave the repo with HEAD detached. There's still a window, just much narrower. I don't know if it's possible to close the window entirely. While git can clearly update the currently checked out branch in eg git merge, it doesn't seem to provide another way to do it. Sponsored-by: Graham Spencer on Patreon
This commit is contained in:
parent
5bc37c2de2
commit
64fc34b3da
1 changed files with 2 additions and 1 deletions
|
@ -254,6 +254,8 @@ updateAdjustedBranch adj (AdjBranch currbranch) origbranch
|
|||
-- origbranch.
|
||||
_ <- propigateAdjustedCommits' origbranch adj commitlck
|
||||
|
||||
b <- adjustBranch adj origbranch
|
||||
|
||||
origheadfile <- inRepo $ readFileStrict . Git.Ref.headFile
|
||||
|
||||
-- Git normally won't do anything when asked to check
|
||||
|
@ -268,7 +270,6 @@ updateAdjustedBranch adj (AdjBranch currbranch) origbranch
|
|||
return (Just newheadfile)
|
||||
_ -> return Nothing
|
||||
|
||||
b <- adjustBranch adj origbranch
|
||||
return (b, origheadfile, newheadfile)
|
||||
|
||||
-- Make git checkout quiet to avoid warnings about
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue