Open Thell opened 12 years ago
Thanks Thell,
That makes sense, I’ll update the repository with files that have the appropriate encoding.
Klaus
From: Thell [mailto:notifications@github.com] Sent: Thursday, November 01, 2012 10:43 AM To: tellingmachine/PSUnit Subject: [PSUnit] Use of UCS-2 encoding hinders git tools. (#1)
It is great to see the source for PSUnit on github, unfortunately, as you can see from looking at any of your commits, the .ps1 files are being recognized as binary because of the chosen encoding. While this does not alter the actual usage of these files it does make working with them harder. The only git tool (that I know of) on Windows that will give a proper diff is TortoiseGit, and patches can not be generated against binary files even when that is used. Using command line tools, like git log -p is virtually impossible unless you are willing to reconfigure your setup to use a console that can wrap and interpret the encoding properly.
Since the only file types in the repository are .ps1 (which should be treated as text) and .xaml (which without an encoding statement will default to UTF-8) a change to using UTF-8 (without BOM) should be done. If this is done in a single commit though then history tools will show that single commit as having changed all files which is obviously not wanted.
To resolve this issue and make for a more easily contributed to project I have run a filter-branch script against the history to convert all of the files to UTF-8 without BOM which allows full usage of git tools without losing the real history or causing any adverse effects on the code.
Hopefully you will be willing to replace your existing repository with this workable one. Since there are current forks against the existing repository (although no changes or pull requests) a notification to these users could be given prior to making the change.
To make the change simply clone the corrected repository from me, then force push it to your existing repository. Then people will be able to simply, for, alter, and create pull requests that will show more than just a new binary file. :)
You can see the difference simply by comparing
tellingmachine/PSUnit@ https://github.com/tellingmachine/PSUnit/commit/b4826d55b5cbe191d0fff7033fa830a469d8e683 b4826d5
to
Thell/PSUnit@ https://github.com/Thell/PSUnit/commit/58fe7fa9cb0610657e60d2e3423a02bf21117249 58fe7fa
— Reply to this email directly or view it on GitHub https://github.com/tellingmachine/PSUnit/issues/1 .
It is great to see the source for PSUnit on github, unfortunately, as you can see from looking at any of your commits, the .ps1 files are being recognized as binary because of the chosen encoding. While this does not alter the actual usage of these files it does make working with them harder. The only git tool (that I know of) on Windows that will give a proper diff is TortoiseGit, and patches can not be generated against binary files even when that is used. Using command line tools, like
git log -p
is virtually impossible unless you are willing to reconfigure your setup to use a console that can wrap and interpret the encoding properly.Since the only file types in the repository are .ps1 (which should be treated as text) and .xaml (which without an encoding statement will default to UTF-8) a change to using UTF-8 (without BOM) should be done. If this is done in a single commit though then history tools will show that single commit as having changed all files which is obviously not wanted.
To resolve this issue and make for a more easily contributed to project I have run a
filter-branch
script against the history to convert all of the files to UTF-8 without BOM which allows full usage of git tools without losing the real history or causing any adverse effects on the code.Hopefully you will be willing to replace your existing repository with this workable one. Since there are current forks against the existing repository (although no changes or pull requests) a notification to these users could be given prior to making the change.
To make the change simply clone the corrected repository from me, then force push it to your existing repository. Then people will be able to simply, for, alter, and create pull requests that will show more than just a new binary file. :)
You can see the difference simply by comparing
https://github.com/tellingmachine/PSUnit/commit/b4826d55b5cbe191d0fff7033fa830a469d8e683
to
https://github.com/Thell/PSUnit/commit/58fe7fa9cb0610657e60d2e3423a02bf21117249