On 12/24/20 1:16 PM, Joel Brobecker wrote:
I have no idea who that is (if it is a single user at all,
if it isn't any user with git write permissions).

CCing Joel, he should help us how to set a git config
that will be used by the server hooks.

I am not sure that requiring both the server and the user to agree
on a non-default configuration value would be a practical idea.

I agree with that but I was unable to find a way how to "decode"
the filenames:


 From what I understand of the problem, I think the proper fix
is really to adapt the git-changelog script to avoid the need
for any assumption about the user's configuration. In particular,
how does the script get the list of files?

On server we use:
git diff HEAD~ --name-status

which works really fine with -z option:
Mcontrib/gcc-changelog/git_repository.pyAšpatně.txt

without it, the patch is quoted as well:

git diff HEAD~ --name-status | cat
M       contrib/gcc-changelog/git_repository.py
A       "\305\241patn\304\233.txt"

Poking around, it looks like
you guys are using the GitPython module, which I'm not familiar with,
unfortunately.  But as a reference point, the git-hooks simply use
the -z option to get the information in raw format, and thus avoids
the problem of filename quoting entirely. Does GitPython support
something similar? For instance, browing the GitPython documentation,
I found attributes a_raw_path and b_raw_path. Could that be the
solution (instead of using a_path and b_path?

Thanks for looking into it. Unfortunately, for a file called "špatně.txt"
I get for a_rawpath and b_rawpath:
b'"\\305\\241patn\\304\\233.txt"' b'"\\305\\241patn\\304\\233.txt"'


Either way, the solution will be independent of the git-hooks,
as I don't think they are actually involved, here.


Anyway, I'm going to update server hook first and I'll create an issue for 
GitPython.

Thanks for help,
Martin

Reply via email to