Re: [PATCH] repack: find -> /usr/bin/find, as for cygwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not sure if there's a set of tests for Cygwin/MinGW among all the
test cases in GIT, here is a simple one:

#!/bin/sh
echo $(uname -s)
case $(uname -s) in
*MINGW*|*CYGWIN*)
  echo "detected MinGW/Cygwin"
  ;;
*MinGW*)
  echo "detected MinGW"
  ;;
*Cygwin*)
  echo "detected Cygwin"
  ;;
esac

Run with dash, the output is

CYGWIN_NT-6.1
detected MinGW/Cygwin

While I don't have MinGW, so someone has it please give it a shot.

Thanks

2011/3/20 Junio C Hamano <gitster@xxxxxxxxx>:
> ryenus â <ryenus@xxxxxxxxx> writes:
>
>> Thank you, Duy, you're almost right, I just checked git-sh-setup.sh,
>> in the bottom, sort and find are defined as functions like what you
>> pointed out, but only for MinGW, therefore a better fix is to check
>> for cygwin as well:
>>
>> ---
>> Âgit-sh-setup.sh | Â Â2 +-
>> Â1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-sh-setup.sh b/git-sh-setup.sh
>> index aa16b83..5c52ae4 100644
>> --- a/git-sh-setup.sh
>> +++ b/git-sh-setup.sh
>> @@ -227,7 +227,7 @@ fi
>>
>> Â# Fix some commands on Windows
>> Âcase $(uname -s) in
>> -*MINGW*)
>> +*MINGW*|*CYGWIN*)
>
> This looks like a more sensible alternative than forbidding the use of
> "find", privided if the new pattern is an appropriate one to catch cygwin.
>
> I don't have any Windows boxes, so I cannot verify, but the patch smells
> correct.
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]