Technical Considerations - archimatetool/archi-modelrepository-plugin2 GitHub Wiki
Important
TL;DR - Do not modify the coArchi2 Git repo or its files manually. If you do you will probably corrupt the model.
- coArchi2 uses Git but it doesn't use all of Git's features. For example, pull requests and Git stash are not supported.
- We want to implement enough Git features to be useful for sharing Archi models, but not so much that it turns into a full-blown Git client
- coArchi2 does not used text-based comparison for model files, it uses EMFCompare. So if you attempt to manually resolve diffs in a text editor this may lead to a corrupt model.
- coArchi2 manages diffs internally so that the model doesn't get corrupted. Do not attempt to manually resolve it.
- The model is stored in a file named
model.archimate
in the repository's root directory. Do not move or rename it. - Any model images are stored in an
images
sub-directory. Do not move or rename it. - Don't add additional files into the Git repo as these are not managed by coArchi2
- "One model, one repository". coArchi2 manages one model per repository (same as coArchi 1), and this will not change.
The model is stored in a file named model.archimate
in the repository's root directory. When Archi loads and saves a *.archimate
file it determines if the file is in a git repository folder by looking for the .git
folder at the same level. In order to determine if a model file containing images should be saved in an archive format (a single *.archimate
file in zip format) or in a non-archived format (one *.archimate
file and an images
folder) it assumes that the file will be at the root alongside a .git
folder.
In order to work, coArchi2 makes certain assumptions about the Git repository. Don't change them.
- The default branch is called
main
- The default (and only) remote is called
origin
- On Windows
autocrlf = true
, on Mac and Linuxautocrlf = input
- On Linux
ignorecase = false
, on Windows and Macignorecase = true
-
hooksPath
is set blank to avoid this problem
Each commit message has additional XML appended that contains information about what model objects changed in that commit. This manifest is not visible in the commit viewer in coArchi2 but is visible if you view the commit message in an external Git tool. This should be regarded as an internal mechanism and should not concern the end user.
An example commit message with appended manifest:
Commit Message
<manifest version="1.0.0">
<changes>
<object id="id-3b5d14cb5245da22feb597ae5ee59389" change="added" />
<object id="id-ca6f9c322114477d2dae4dbf12fce421" change="modified" />
</changes>
</manifest>
When a commit occurs the changes are calculated between the previous commit and the new one. This may cause a slight delay if the model is large.
See this issue for more information. And, no, we're not going to use Git Notes to do this as this adds overhead.