sync: Warn when the adjusted basis ref cannot be found

As happens eg when the user has renamed branches.

Sponsored-by: Graham Spencer on Patreon
This commit is contained in:
Joey Hess 2023-02-10 14:33:21 -04:00
parent fb93fbc564
commit bb4550c7c1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 6 additions and 1 deletions

View file

@ -490,7 +490,9 @@ propigateAdjustedCommits' origbranch adj _commitsprevented =
, rebase currcommit newparent
)
Nothing -> return (Nothing, return ())
Nothing -> return (Nothing, return ())
Nothing -> do
warning $ "Cannot find basis ref " ++ fromRef basis ++ "; not propagating adjusted commits to original branch " ++ fromRef origbranch
return (Nothing, return ())
where
(BasisBranch basis) = basisBranch adjbranch
adjbranch@(AdjBranch currbranch) = originalToAdjusted origbranch adj