Skip to content

Commit

Permalink
Fix git-cherry-pick.rst
Browse files Browse the repository at this point in the history
The `base_tree` that must be used for a cherry pick is the cherry-picked commit parent.
  • Loading branch information
herrerog authored Jan 16, 2024
1 parent 3cbf20d commit 644fa48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/recipes/git-cherry-pick.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ example `three-argument rebases`_.
cherry = repo.revparse_single('9e044d03c')
basket = repo.branches.get('basket')
base = repo.merge_base(cherry.id, basket.target)
base_tree = cherry.parents[0].tree
index = repo.merge_trees(base, basket, cherry)
index = repo.merge_trees(base_tree, basket, cherry)
tree_id = index.write_tree(repo)
author = cherry.author
Expand Down

0 comments on commit 644fa48

Please sign in to comment.