Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))
I made a few exceptions for bundled and generated files
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
## About The Pull Request
`tools/hooks/install.py` iterates through all git config entries, and
tries to remove any merge drivers it finds.
However, this includes global `~/.gitconfig` entries and such, which
will result in an error if you have any merge drivers defined in the
global config.
I made it so it will only check local (`.git/config`) entries for merge
drivers.
## Why It's Good For The Game
fixes a rare but still annoying edge-case error
## Changelog
No user-facing changes, this is only a fix for development tools.
* Use portable Python for map merge hooks, other tools (#55658)
* Add .dmm merge driver (#55699)
This is kind of a prototype. It only fully handles a few situations,
and doesn't produce particularly easy-to-read conflict markers when it
fails. I hope that it can be useful at least some of the time, can be
improved over time, and that the lessons learned can influence a future
interactive GUI conflict resolver (integrated into StrongDMM?). In the
worst case, one can fall back to the tried and true "manually re-do one
side's changes" strategy.
**Automatic use**: In `tools/hooks/`, run `Install.bat`
**Manual use**, for Git GUIs that don't run merge drivers: while a
merge is in progress, in `tools/mapmerge2/`, double-click `Resolve Map
Conflicts.bat`
This PR also removes the error-prone "Prepare Maps.bat" /
"mapmerge.bat" workflow. Those who aren't using the hooks should
instead use `Run Before Committing.bat` before committing. First-time
contributors who opened a PR without map merging can be advised to run
`I Forgot To Map Merge.bat`.
* Fix loose double-quot in tradership_faction.dmm
Co-authored-by: Tad Hardesty <tad@platymuus.com>
* Skip app execution aliases when searching for Python (#53569)
* Skip app execution aliases when searching for Python
Co-authored-by: Tad Hardesty <tad@platymuus.com>
Turns out GitHub Desktop actually does bundle a sh.exe, just not a bash.
Also tries to look for the py launcher to help people who didn't check
the "Add Python to PATH" option.
It hooks into git as a merge driver and automatically runs with merges.
It prints a log of what it did, and if any specific states are
conflicted it indicates them and does not mark the merge as successful.
The conflicting icon can then be opened in DreamMaker and the
conflicting states resolved there.
Key benefits of the new mapmerge include: multi-Z support, effective
reuse of deleted keys, automatic handling of key overflow, and utilizing
a git pre-commit hook to eliminate the need to run batch files manually.