Re: [PATCH] add git-p4.fallbackEncoding config variable, to prevent git-p4 from crashing on non UTF-8 changeset descriptions
- From
- Tzadik Vanderhoof <tzadik.vanderhoof@gmail.com>
- Date
- Apr 23, 2021, 19:08 UTC
- Message-ID
- <CAKu1iLXPi4zc-5-RtZo3UBwTQ1GqshXjLEZKT=WvtvB0aiuUJA@mail.gmail.com>
- In-Reply-To
- <CAKu1iLVwfQ7Y-bOSO1tyxyFaNWum8sKW4b00i1nJCef98_2=UQ@mail.gmail.com>
To clarify....
The new config variable I am introducing addresses an issue that only occurs on Windows. This is because the behavior of the "p4" command differs on Windows vs Linux around Unicode in changeset descriptions.
I don't have the source code for "p4", but I'm guessing it's written in C, and that this difference in behavior is simply a result of the fact that there is no defined standard of how "char *argv[]" in "main" should deal with non-ASCII characters being passed in from the command line.
As a result, "git p4 clone" on Linux is not affected by this "p4" behavior. Since my tests assume the Windows behavior, they fail when run on Linux. For this reason, I added code to my tests to skip them on Linux.
On a related note, I don't think there are any CI environments on github for git that are (a) on Windows, and (b) have Python and (c) have Perforce, so I don't think my tests are actually running on github CI. I'm not sure how that can be addressed.