git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
ryenus ◇ <ryenus@gmail.com>
Date
Mar 20, 2011, 00:35 UTC
Message-ID
<AANLkTinFFnm7-TKcbTdbzJHx4i4L8rdi4xogr3R7=7s1@mail.gmail.com>
In-Reply-To
<AANLkTinPCeg3NU2bRvk8rwWSWnu4b0PHwya9+PWAc3DB@mail.gmail.com>
oops, corrected the script with the test strings in upper cases
#!/bin/sh
echo $(uname -s)
case $(uname -s) in
*MINGW*|*CYGWIN*)
  echo "detected MinGW/Cygwin"
  ;;
*MINGW*)
  echo "detected MinGW"
  ;;
*CYGWIN*)
  echo "detected Cygwin"
  ;;
esac
On Sun, Mar 20, 2011 at 08:31, ryenus ◇ <ryenus@gmail.com> wrote:
Show 58 quoted lines
> 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@pobox.com>:
>> ryenus ◇ <ryenus@gmail.com> 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.
>>
>>
>>
>
Previous: ryenus ◇Next: Matthieu Moy
Message 11 of 14 in “repack: find -> /usr/bin/find, as for cygwin”
  1. repack: find -> /usr/bin/find, as for cygwinryenus ◇, Mar 19, 2011
  2. Nguyen Thai Ngoc DuyMar 19, 2011
  3. René ScharfeMar 19, 2011
  4. Nguyen Thai Ngoc DuyMar 19, 2011
  5. Nguyen Thai Ngoc DuyMar 19, 2011
  6. ryenus ◇Mar 19, 2011
  7. ryenus ◇Mar 19, 2011
  8. Nguyen Thai Ngoc DuyMar 19, 2011
  9. Junio C HamanoMar 19, 2011
  10. ryenus ◇Mar 20, 2011
  11. ryenus ◇Mar 20, 2011
  12. Matthieu MoyMar 20, 2011
  13. ryenus ◇Mar 20, 2011
  14. Erik Faye-LundMar 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.