Commit 51e009dd authored by Ben Boeckel's avatar Ben Boeckel

Revert "update-common: always use a subtree option for merging"

The simpler code only works if the target directory already exists in
the target location. Instead, go back to the old merge/read-tree dance
which always works for initializing the directory.

This reverts commit 020ca677.
parent 020ca677
......@@ -130,10 +130,13 @@ readonly newhash="$( git rev-parse HEAD )"
# Merge the subset into this repository
if [ -z "$basehash" ]; then
if [ -n "$basehash" ]; then
git merge -s recursive "-Xsubtree=$subtree/" --no-commit "$newhash"
git fetch "$extractdir"
git merge -s ours --no-commit "$newhash"
git read-tree -u --prefix="$subtree/" "$newhash"
git merge -s recursive "-Xsubtree=$subtree/" --no-commit "$newhash"
sed -i -e "/NEWHASH$/s/='.*'/='$newhash'/" "$update"
git add "$update"
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