Skip to content
Snippets Groups Projects
Commit f1a55839 authored by Brad King's avatar Brad King
Browse files

update-third-party: Add 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 3142808f
No related branches found
No related tags found
No related merge requests found
......@@ -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
popd
}
die () {
echo >&2 "$@"
exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment