diff --git a/setup_main_tex_file.py b/setup_main_tex_file.py index 2062535..30dbb17 100755 --- a/setup_main_tex_file.py +++ b/setup_main_tex_file.py @@ -110,6 +110,14 @@ def git_integration(func): tree, parents) + basket = repo.branches.get(branch_name) + cherry = repo.lookup_branch('refs/heads/master').target + base = repo.merge_base(cherry, basket.target) + base_tree = cherry.parents[0].tree + + index = repo.merge_trees(base_tree, basket, cherry) + tree_id = index.write_tree(repo) + repo.create_commit(basket.name, author, committer, 'bof', tree_id, [basket.target]) return inner