diff --git a/scripts/celerity/install_merge.sh b/scripts/celerity/install_merge.sh new file mode 100755 index 0000000000..e6d99e3c7c --- /dev/null +++ b/scripts/celerity/install_merge.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "src/__celerity_resource_map__.php merge=celerity" \ + >> `dirname "$0"`/../../.git/info/attributes + +git config merge.celerity.name "Celerity Mapper" + +git config merge.celerity.driver \ + '$GIT_DIR/../scripts/celerity_mapper.php $GIT_DIR/../webroot' diff --git a/src/docs/developer/adding_new_css_and_js.diviner b/src/docs/developer/adding_new_css_and_js.diviner index 5f583eca63..5bb5f5914f 100644 --- a/src/docs/developer/adding_new_css_and_js.diviner +++ b/src/docs/developer/adding_new_css_and_js.diviner @@ -58,6 +58,15 @@ If you've only changed file content things will generally work even if you don't, but they might start not working as well in the future if you skip this step. +The generated file `src/__celerity_resource_map__.php` causes merge conflicts +quite often. They can be resolved by running the Celerity mapper. You can +automate this process by running: + + phabricator/ $ ./scripts/celerity/install_merge.sh + +This will install Git merge driver which will run when a conflict in this file +occurs. + = Including a File = To include a CSS or JS file in a page, use