fix export subtree reversion

Fix reversion in last release that caused wrong tree to be written to
remote tracking branch after an export of a subtree.

The invariant "commitsha should have the treesha as its tree"
was not met due to a bug. Guarantee it's met by catting the commitsha
to find its actual tree. A little bit slower, but this is not run often.
This commit is contained in:
Joey Hess 2019-05-06 13:56:39 -04:00
parent 0533fde73c
commit bf7ecd6892
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 42 additions and 9 deletions

View file

@ -192,7 +192,7 @@ buildImportCommit' importcommitconfig mtrackingcommit imported@(History ti _) =
let oldimportedtrees = mapHistory historyCommitTree oldimported
mknewcommits oldhc oldimportedtrees imported
Just <$> makeRemoteTrackingBranchMergeCommit'
trackingcommit importedcommit ti
trackingcommit importedcommit
where
h'@(History t s) = mapHistory historyCommitTree h