Commit 6f08c86b authored by Tomáš Hübelbauer's avatar Tomáš Hübelbauer

Fix typos

parent d20275bf
......@@ -10,7 +10,7 @@ Modern Office file formats are ZIP archives with XML files in them.
Initially I figured recompressing them using the store method would pretty much turn them into human readable files save for the ZIP header garbage. VS Code diff will still treat them as binary files because of it, though, and I want to avoid reconfiguring the diff tool or the text editor for this. Also, even if this worked, any embedded images and other binary objects would still show up as garbage in the diff (and may cause the diff tool to lose track of individual "files" within the single store archive file), only the plaintext files from the archive would diff properly.
That's why I decided to use a pre-commit hook instead to unpack the Office file before commiting and track the compressed and decompressed versions in parallel. [Learn about Git hooks here.](https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks). Obviously a downside to this is that anyone can modify these generated files in the repository. I do not present a solution for this and I do recognize and agree to the fact that tracking generates files in Git is stupid, but then again, so is that with binary files and since I already need to track some binary files why not go stupid all the way and track generated files also. It's for an experiment only so, hey.
That's why I decided to use a pre-commit hook instead to unpack the Office file before commiting and track the compressed and decompressed versions in parallel. [Learn about Git hooks here](https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks). Obviously a downside to this is that anyone can modify these generated files in the repository. I do not present a solution for this and I do recognize and agree to the fact that tracking generates files in Git is stupid, but then again, so is that with binary files and since I already need to track some binary files why not go stupid all the way and track generated files also. It's for an experiment only so, hey.
I am on Windows and I have installed Git using the official Windows installer. This should immediately raise some eyebrows when it comes to portability. What will Git on Windows do with the hooks? Run them using Batch/PowerShell? No, Git for Windows bundles it's own Bash through MinGW. MinGW has package manager so we could potentially install the `7z` package to it and have a nice, portable script. Ordinarily you install these packages through a MinGW UI, but either I don't know shit or Git doesn't bundle this PM GUI, nor does it bundle the `mingw-get` command for installing these packages. MinGW is horrible anyway so let's figure out a different route.
......@@ -48,7 +48,7 @@ powershell cmd/pre-commit.ps1 || bash cmd/pre-commit.sh
## Dry run
There doesn't see to be a good way to dry-run the pre-commit hook. (`git commit --dry-run` doesn't run it.)
There doesn't seem to be a good way to dry-run the pre-commit hook. (`git commit --dry-run` doesn't run it.)
Either invoke `powershell cmd/pre-commit.ps1` directly or use PowerShell ISE or just commit stuff.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment