make merge commit on export that preserves the import history
This commit is contained in:
parent
d1c283b691
commit
2bd0e07ed8
4 changed files with 47 additions and 8 deletions
|
@ -31,6 +31,7 @@ import Annex.Link
|
|||
import Annex.LockFile
|
||||
import Annex.Content
|
||||
import Annex.Export
|
||||
import Annex.RemoteTrackingBranch
|
||||
import Command
|
||||
import Backend
|
||||
import Config
|
||||
|
@ -188,12 +189,9 @@ buildImportCommit' importcommitconfig mtrackingcommit imported@(History ti _) =
|
|||
-- history as exported, and git merge will understand that
|
||||
-- the history is connected.
|
||||
| otherwise = do
|
||||
ci <- mkcommits imported
|
||||
let parents =
|
||||
[ trackingcommit
|
||||
, ci
|
||||
]
|
||||
Just <$> mkcommit parents ti
|
||||
importedcommit <- mkcommits imported
|
||||
Just <$> makeRemoteTrackingBranchMergeCommit'
|
||||
trackingcommit importedcommit ti
|
||||
where
|
||||
h'@(History t s) = mapHistory historyCommitTree h
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue