mirror of
https://github.com/git/git.git
synced 2024-11-01 14:57:52 +01:00
Fix splitting after using a squash merge.
This commit is contained in:
parent
eb4fb91094
commit
1a8c36dc5f
1 changed files with 6 additions and 2 deletions
|
@ -203,13 +203,17 @@ find_existing_splits()
|
|||
dir="$1"
|
||||
revs="$2"
|
||||
git log --grep="^git-subtree-dir: $dir\$" \
|
||||
--pretty=format:'%s%n%n%b%nEND%n' $revs |
|
||||
--pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |
|
||||
while read a b junk; do
|
||||
case "$a" in
|
||||
START) main="$b" ;;
|
||||
START) main="$b"; sq="$b" ;;
|
||||
git-subtree-mainline:) main="$b" ;;
|
||||
git-subtree-split:) sub="$b" ;;
|
||||
END)
|
||||
if [ -z "$main" -a -n "$sub" ]; then
|
||||
# squash commits refer to a subtree
|
||||
cache_set "$sq" "$sub"
|
||||
fi
|
||||
if [ -n "$main" -a -n "$sub" ]; then
|
||||
debug " Prior: $main -> $sub"
|
||||
cache_set $main $sub
|
||||
|
|
Loading…
Reference in a new issue