mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Automatically resolve merge conflicts in Celerity map
Summary: We can use `.gitattributes` instead but there's no way how to set repository config for all users in Git, right? So provide a script writting to `.git/info/attributes` instead so that we don't have to .gitignore `.gitattributes`. Test Plan: $ scripts/celerity/install_merge.sh $ git pull # with merge conflict in Celerity map Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3228
This commit is contained in:
parent
af0a399222
commit
80d9a276f3
2 changed files with 18 additions and 0 deletions
9
scripts/celerity/install_merge.sh
Executable file
9
scripts/celerity/install_merge.sh
Executable file
|
@ -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'
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue