test_vim9_func.vim seems to be weird in github repository

10 views
Skip to first unread message

Ernie Rael

unread,
Jun 12, 2024, 11:53:06 AM6/12/24
to vim...@googlegroups.com

I use "hg-git" so that may contribute to what I'm seeing. 

But I've tried this on a few files and only this one file has an issue.

I mad a tiny change to test_vim9_func.vim, and when I diff I get

$ hg diff | head -5
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index d07bbfba70705d5d371e25907ebb6f9f3ba4cb69..cb75bad01b8374ece9f84f6ac084a65eb8615490
GIT binary patch
literal 107940
zc%1FM{d?Os(kOa=_FsW2XG^J397%TKL~oOBn#A3nZIeAsy6t@&zj`Q%wpmN0mZWTX

I tried this both on a local clone of the main vim repo and a clone of my fork of the vim repo.

I don't know git (and am not interested in learning it, quite the opposite).

If anyone can provide some insight on why I'm seeing "GIT binary patch" for this one file...

-ernie

Christian Brabandt

unread,
Jun 12, 2024, 12:05:19 PM6/12/24
to vim...@googlegroups.com
> If anyone can provide some insight on why I'm seeing "*GIT binary patch*"
> for this one file...

This is probably because of the ASCI NUL characters in the
Test_invalid_redir() function, which cause git/hg to detect this file as
non-ascii and therefore creates this binary patch. In git, one could
mark it as text, but not sure if a patch would then still work if it
affects those characters. On the other hand, I would hope, that git/hg
is hopefully fine importing such a binary patch.

Thanks,
Christian
--
Q: How many Harvard MBA's does it take to screw in a light bulb?
A: Just one. He grasps it firmly and the universe revolves around him.

Ernie Rael

unread,
Jun 12, 2024, 12:22:03 PM6/12/24
to vim...@googlegroups.com
On 24/06/12 9:05 AM, Christian Brabandt wrote:
> On Mi, 12 Jun 2024, Ernie Rael wrote:
>
>> I use "hg-git" so that may contribute to what I'm seeing.
>>
>> But I've tried this on a few files and only this one file has an issue.
>>
>> I mad a tiny change to test_vim9_func.vim, and when I diff I get
>>
>> $ hg diff | head -5
>> diff --git a/src/testdir/test_vim9_func.vim
>> b/src/testdir/test_vim9_func.vim
>> index
>> d07bbfba70705d5d371e25907ebb6f9f3ba4cb69..cb75bad01b8374ece9f84f6ac084a65eb8615490
>> GIT binary patch
>> literal 107940
>> zc%1FM{d?Os(kOa=_FsW2XG^J397%TKL~oOBn#A3nZIeAsy6t@&zj`Q%wpmN0mZWTX
>>
>> I tried this both on a local clone of the main vim repo and a clone of my
>> fork of the vim repo.
>>
>> I don't know git (and am not interested in learning it, quite the opposite).
>>
>> If anyone can provide some insight on why I'm seeing "*GIT binary patch*"
>> for this one file...
> This is probably because of the ASCI NUL characters in the
> Test_invalid_redir() function, which cause git/hg to detect this file as
> non-ascii and therefore creates this binary patch. In git, one could
> mark it as text, but not sure if a patch would then still work if it
> affects those characters. On the other hand, I would hope, that git/hg
> is hopefully fine importing such a binary patch.

Ah, thanks.

I was concerned that it was some kind of metadata issue with the file
and not the file itself.

"hg diff" has an option to treat all files as text (now I know (till I
forget)).

-ernie

>
> Thanks,
> Christian


Reply all
Reply to author
Forward
0 new messages