Commit 3cd97d19 authored by Ben Boeckel's avatar Ben Boeckel

update-common: use the subtree option to git

parent f6654562
...@@ -130,9 +130,13 @@ readonly newhash="$( git rev-parse HEAD )" ...@@ -130,9 +130,13 @@ readonly newhash="$( git rev-parse HEAD )"
popd popd
# Merge the subset into this repository # Merge the subset into this repository
git fetch "$extractdir" if [ -n "$basehash" ]; then
git merge -s ours --no-commit "$newhash" git merge -s recursive "-Xsubtree=$subtree/" --no-commit "$newhash"
git read-tree -u --prefix="$subtree/" "$newhash" else
git fetch "$extractdir"
git merge -s ours --no-commit "$newhash"
git read-tree -u --prefix="$subtree/" "$newhash"
fi
sed -i -e "/NEWHASH$/s/='.*'/='$newhash'/" "$update" sed -i -e "/NEWHASH$/s/='.*'/='$newhash'/" "$update"
git add "$update" git add "$update"
git commit -m "$name: update to $tag" git commit -m "$name: update to $tag"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment