Commit 50bf54f9 authored by Brad King's avatar Brad King 💬 Committed by Ben Boeckel

update-common: Add update script helper to disable custom gitattributes

Provide a helper function that import scripts can use when the
third-party project defines custom Git attributes in its top-level
`.gitattributes` file.  These must be commented out because Git
does not support custom attributes in a subdirectory where we
where the third-party project is about to be merged.
parent 5ebc79de
......@@ -52,6 +52,14 @@ git_archive () {
tar -C "$extractdir" -x
disable_custom_gitattributes() {
pushd "${extractdir}/${name}-reduced"
# Git does not allow custom attributes in a subdirectory where we
# are about to merge the `.gitattributes` file, so disable them.
sed -i '/^\[attr\]/ {s/^/#/}' .gitattributes
die () {
echo >&2 "$@"
exit 1
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