On Thu, Aug 13, 2015 at 10:37 AM, Johannes Schindelin
> Hi kusma,
> On 2015-08-12 13:58, Erik Faye-Lund wrote:
>> On Wed, Aug 12, 2015 at 1:07 PM, Johannes Schindelin
>>> On 2015-08-11 22:51, Johannes Sixt wrote:
>>>> Invoking plink requires special treatment, and we have support and even
>>>> test cases for the commands 'plink' and 'tortoiseplink'. We also support
>>>> .exe variants for these two and there is a test for 'plink.exe'.
>>>> On Windows, however, where support for plink.exe would be relevant, the
>>>> test case fails because it is not possible to execute a file with a .exe
>>>> extension that is actually not a binary executable---it is a shell
>>>> script in our test. We have to disable the test case on Windows.
>>> Oh how would I wish you were working on Git for Windows even *just* a bit *with* me. At least I would wish for a more specific description of the development environment, because it sure as hell is not anything anybody can download and install as easily as Git for Windows' SDK.
>>> FWIW Git for Windows has this patch (that I wanted to contribute in due time, what with being busy with all those tickets) to solve the problem mentioned in your patch in a different way:
>> Yuck. On Windows, it's the extension of a file that dictates what kind
>> of file it is (and if it's executable or not), not the contents.
> Careful. If you continue along those lines, interactive rebase, `git add -p` and all those wonderful scripts Git has will have to stop working.
> Because those scripts completely disagree with what you just said about Windows if you think about it: *none* of them has an extension.
> I know that you do not mean this, of course, but that is the argument you were making... ;-)
You should know better than to straw-man like that.
I was not arguing to break any current functionality, but to not move
further away from Windows' semantics.
But if I would have, there's nothing that would stop us from renaming
those scrips to *.sh, and let the filename dictate how to execute
them. Or provide batch-files to wrap them.
>> If we get a shell script written with the ".exe"-prefix, it's considered as
>> an invalid executable by the system.
> And if we get a shell script without any `.exe` suffix, it is still considered as an invalid executable by the system.
Nope, it's considered an unknown file, not an executable at all.
> And even if we tack on an `.sh` suffix (which is *not* in line with the way Git works), it is *still* considered as an invalid executable by the system.
That's not necessarily true; the Git for Windows installer
(optionally, but on by default) registers /bin/sh as a file-handler
for .sh files. Windows knows just fine how to execute them, unless the
user opts out.
But again, I was not arguing to patch git to not parse the shebang.