Just (adj, origbranch) -> do
let basis@(BasisBranch bb) = basisBranch (originalToAdjusted origbranch adj)
unlessM (inRepo $ Git.Ref.exists bb) $ do
- unlessM (inRepo $ Git.Ref.exists origbranch) $ do
- let remotebranch = Git.Ref.underBase "refs/remotes/origin" origbranch
- inRepo $ Git.Branch.update' origbranch remotebranch
aps <- fmap commitParent <$> findAdjustingCommit (AdjBranch currbranch)
case aps of
- Just [p] -> setBasisBranch basis p
+ Just [p] -> do
+ unlessM (inRepo $ Git.Ref.exists origbranch) $
+ inRepo $ Git.Branch.update' origbranch p
+ setBasisBranch basis p
_ -> giveup $ "Unable to clean up from clone of adjusted branch; perhaps you should check out " ++ Git.Ref.describe origbranch
return InAdjustedClone
* fsck: When downloading content from a remote, if the content is able
to be verified during the transfer, skip checksumming it a second time.
* directory: When cp supports reflinks, use it.
+ * init: Fix a crash when the repo's was cloned from a repo that had an
+ adjusted branch checked out, and the origin remote is not named "origin".
-- Joey Hess <id@joeyh.name> Thu, 01 Apr 2021 12:17:26 -0400