1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-26 09:26:37 +02:00
git/contrib/subtree
Philippe Blain 1762382ab1 subtree: fix split after annotated tag was squashed merged
The previous commit fixed a failure in 'git subtree merge --squash' when
the previous squash-merge merged an annotated tag of the subtree
repository which is missing locally.

The same failure happens in 'git subtree split', either directly or when
called by 'git subtree push', under the same circumstances: 'cmd_split'
invokes 'find_existing_splits', which loops through previous commits and
invokes 'git rev-parse' (via 'process_subtree_split_trailer') on the
value of any 'git subtree-split' trailer it finds. This fails if this
value is the hash of an annotated tag which is missing locally.

Add a new optional argument 'repository' to 'cmd_split' and
'find_existing_splits', and invoke 'cmd_split' with that argument from
'cmd_push'. This allows 'process_subtree_split_trailer' to try to fetch
the missing tag from the 'repository' if it's not available locally,
mirroring the new behaviour of 'git subtree pull' and 'git subtree
merge'.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-21 13:51:06 -07:00
..
t subtree: fix split after annotated tag was squashed merged 2022-10-21 13:51:06 -07:00
.gitignore subtree: add an install-html target 2014-10-15 15:17:08 -07:00
COPYING
INSTALL Fix git-subtree install instructions 2012-04-09 22:26:19 -05:00
Makefile subtree: fix build with AsciiDoctor 2 2020-04-08 12:10:36 -07:00
README
git-subtree.sh subtree: fix split after annotated tag was squashed merged 2022-10-21 13:51:06 -07:00
git-subtree.txt subtree: fix split after annotated tag was squashed merged 2022-10-21 13:51:06 -07:00
todo subtree: give the docs a once-over 2021-04-28 16:47:19 +09:00

Please read git-subtree.txt for documentation.

Please don't contact me using github mail; it's slow, ugly, and worst of
all, redundant. Email me instead at apenwarr@gmail.com and I'll be happy to
help.

Avery