1
0
Fork 0
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:
vrana 2012-08-09 15:44:09 -07:00
parent af0a399222
commit 80d9a276f3
2 changed files with 18 additions and 0 deletions

View 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'

View file

@ -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