Skip to content

subtree: fix split and merge after annotated tag was squash-merged

Philippe Blain via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9test-lib-functions: mark 'test_commit' variables as 'local't/test-lib-functions.sh+8 -83 replies
2/9subtree: use 'git rev-parse --verify [--quiet]' for better error messagescontrib/subtree/git-subtree.sh+3 -30 replies
3/9subtree: add 'die_incompatible_opt' function to reduce duplicationcontrib/subtree/git-subtree.sh+20 -122 replies
4/9subtree: prefix die messages with 'fatal'contrib/subtree/git-subtree.sh contrib/subtree/t/t7900-subtree.sh+36 -362 replies
5/9subtree: define a variable before its first use in 'find_latest_squash'contrib/subtree/git-subtree.sh+1 -10 replies
6/9subtree: use named variables instead of "$@" in cmd_pullcontrib/subtree/git-subtree.sh+4 -20 replies
7/9subtree: process 'git-subtree-split' trailer in separate functioncontrib/subtree/git-subtree.sh+11 -40 replies
8/9subtree: fix squash merging after annotated tag was squashed mergedcontrib/subtree/git-subtree.sh contrib/subtree/git-subtree.txt contrib/subtree/t/t7900-subtree.sh+86 -150 replies
9/9subtree: fix split after annotated tag was squashed mergedcontrib/subtree/git-subtree.sh contrib/subtree/git-subtree.txt contrib/subtree/t/t7900-subtree.sh+36 -93 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] subtree: fix split and merge after annotated tag was squash-merged

This series fixes a limitation of 'git subtree merge' and 'git subtree split' that would fail when the previous squash-merge merged an annotated tag of the subtree repository that is missing locally.

The 5 first commits are small improvements for coherency with the rest of the code base, robustness, user experience and maintanability.

Commits 6-7 are small refactors that prepare for the fix in the next commits. Commits 8-9 fix the behaviour for merge and split, respectively.

I'm CC-ing people that worked on 'git subtree' recently.

Cheers!

Philippe Blain (9):
test-lib-functions: mark 'test_commit' variables as 'local'
subtree: use 'git rev-parse --verify [--quiet]' for better error
messages
subtree: add 'die_incompatible_opt' function to reduce duplication
subtree: prefix die messages with 'fatal'
subtree: define a variable before its first use in
'find_latest_squash'
subtree: use named variables instead of "$@" in cmd_pull
subtree: process 'git-subtree-split' trailer in separate function
subtree: fix squash merging after annotated tag was squashed merged
subtree: fix split after annotated tag was squashed merged

 contrib/subtree/git-subtree.sh     | 177 +++++++++++++++++++----------
 contrib/subtree/git-subtree.txt    |  16 ++-
 contrib/subtree/t/t7900-subtree.sh |  60 +++++++++-
 t/test-lib-functions.sh            |  16 +--
 4 files changed, 192 insertions(+), 77 deletions(-)

base-commit: 45c9f05c44b1cb6bd2d6cb95a22cf5e3d21d5b63
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1390%2Fphil-blain%2Fsubtree-pull-tag-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1390/phil-blain/subtree-pull-tag-fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1390

Signature · 1 line
gitgitgadget