This patch makes sure that error messages that should be shown to users are wrapped using git's pkt-line protocol and thus git client can display them properly.
Please adjust and rebase on the top of https://pagure.io/pagure/pull-request/4026 :)
Hehe, will do :)
rebased onto c9380189944f72c00e7dd4a1a76be22a3e5eb644
It should still print to stderr, otherwise it doesn't get displayed to the user (which means it should likely also print to stderr above)
Did you test it? I did and it needs to print to stdout for the git client to read the pkt-line message and display it (IIUC git client reads pkt-line messages only from stdout, not from stderr).
See the commit message :)
I see now that writing to stderr is much easier than using pkt-line. Therefore the code from #4026 is also correct and it's not that complex, so I'm closing this PR.
Pull-Request has been closed by bkabrda
This patch makes sure that error messages that should be shown to users are wrapped using git's pkt-line protocol and thus git client can display them properly.