adjust: Propagate submodule changes back to original branch
When the recorded submodule commit changes on an adjusted branch, the change is carried in the function that reverseAdjustedCommit passes for adjustTree's adjusttreeitem parameter. Update the CommitObject handling in adjustTree to consider adjusttreeitem so that a submodule change is synced back.
This commit is contained in:
parent
78977ce417
commit
376e69ec65
1 changed files with 6 additions and 2 deletions
|
@ -237,8 +237,12 @@ adjustTree adjusttreeitem addtreeitems resolveaddconflict removefiles r repo =
|
|||
let !modified' = modified || slmodified || wasmodified
|
||||
go h modified' (subtree : c) depth intree is'
|
||||
Just CommitObject -> do
|
||||
let ti = TreeCommit (LsTree.file i) (LsTree.mode i) (LsTree.sha i)
|
||||
go h wasmodified (ti:c) depth intree is
|
||||
let ti = TreeItem (LsTree.file i) (LsTree.mode i) (LsTree.sha i)
|
||||
v <- adjusttreeitem ti
|
||||
let commit = tc $ fromMaybe ti v
|
||||
go h wasmodified (commit:c) depth intree is
|
||||
where
|
||||
tc (TreeItem f m s) = TreeCommit f m s
|
||||
_ -> error ("unexpected object type \"" ++ decodeBS (LsTree.typeobj i) ++ "\"")
|
||||
| otherwise = return (c, wasmodified, i:is)
|
||||
|
||||
|
|
Loading…
Reference in a new issue