public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Git shows nothing in cmd.exe
@ 2020-11-10 10:35 KAVALAGIOS Panagiotis (EEAS-EXT)
  2020-11-10 12:03 ` Adam Dinwoodie
  0 siblings, 1 reply; 7+ messages in thread
From: KAVALAGIOS Panagiotis (EEAS-EXT) @ 2020-11-10 10:35 UTC (permalink / raw)
  To: cygwin

Hello,

I would like to report an issue with git. The following command:

$ git branch -a
* master
  remotes/origin/master

works fine under Cygwin terminal, but it displays nothing under cmd.exe. We are using

git version 2.21.0

and

CYGWIN_NT-10.0 XXX 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin

The "set CYGWIN=disable_pcon" in the cmd.exe didn't help.

Regards,

Panos Kavalagios

Application Architect
CONSULIAT (under contract with the EEAS)
BA.BS.3.IS
_____________________________________
Office: EEAS B100 Floor 5 Area 048
Rue Belliard 100, 1000 Brussels
Phone: +32 2 584 6017

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git shows nothing in cmd.exe
  2020-11-10 10:35 Git shows nothing in cmd.exe KAVALAGIOS Panagiotis (EEAS-EXT)
@ 2020-11-10 12:03 ` Adam Dinwoodie
       [not found]   ` <72f4f32d00e44071afbaa74b6b77ebad@BELBRU-EXMP101.eeas.europa.eu>
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Dinwoodie @ 2020-11-10 12:03 UTC (permalink / raw)
  To: cygwin

On Tue, 10 Nov 2020 at 10:35, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
> Hello,
>
> I would like to report an issue with git. The following command:
>
> $ git branch -a
> * master
>   remotes/origin/master
>
> works fine under Cygwin terminal, but it displays nothing under cmd.exe. We are using
>
> git version 2.21.0
>
> and
>
> CYGWIN_NT-10.0 XXX 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin
>
> The "set CYGWIN=disable_pcon" in the cmd.exe didn't help.

Can you please provide the output from running `where.exe git` in a
cmd.exe session, as well as the diagnostics requested in the problem
reporting guidelines below?

> Problem reports:      https://cygwin.com/problems.html

Given that, we'll be able to help work out what's going wrong for you.

For what it's worth, having just checked, running Cygwin Git from a
cmd.exe shell works as expected for me.

Adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git shows nothing in cmd.exe
       [not found]   ` <72f4f32d00e44071afbaa74b6b77ebad@BELBRU-EXMP101.eeas.europa.eu>
@ 2020-11-10 12:56     ` Adam Dinwoodie
  2020-11-10 13:35       ` KAVALAGIOS Panagiotis (EEAS-EXT)
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Dinwoodie @ 2020-11-10 12:56 UTC (permalink / raw)
  To: cygwin

On Tue, 10 Nov 2020 at 12:19, KAVALAGIOS Panagiotis (EEAS-EXT)  wrote:
>
> > -----Original Message-----
> > From: Cygwin <cygwin-bounces@cygwin.com> On Behalf Of Adam
> > Dinwoodie
> > Sent: 10 November 2020 13:04
> > Subject: Re: Git shows nothing in cmd.exe
> >
> > On Tue, 10 Nov 2020 at 10:35, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
> > > Hello,
> > >
> > > I would like to report an issue with git. The following command:
> > >
> > > $ git branch -a
> > > * master
> > >   remotes/origin/master
> > >
> > > works fine under Cygwin terminal, but it displays nothing under
> > > cmd.exe. We are using
> > >
> > > git version 2.21.0
> > >
> > > and
> > >
> > > CYGWIN_NT-10.0 XXX 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin
> > >
> > > The "set CYGWIN=disable_pcon" in the cmd.exe didn't help.
> >
> > Can you please provide the output from running `where.exe git` in a cmd.exe
> > session, as well as the diagnostics requested in the problem reporting
> > guidelines below?
>
> Sure, the command shows the following:
>
> C:\>where.exe git
> C:\Program Files\Cygwin\bin\git.exe
> C:\Program Files\Git\cmd\git.exe
>
> Of course the Git for Windows installed is not affected by that issue. It works also fine under cmd.exe.
>
> > > Problem reports:      https://cygwin.com/problems.html
> >
> > Given that, we'll be able to help work out what's going wrong for you.
>
> I apologise for forgetting that. I have included it in my present e-mail.
>
> > For what it's worth, having just checked, running Cygwin Git from a cmd.exe
> > shell works as expected for me.
>
> OK, thanks. It's good to know that Adam. So it is possibly something in our configuration or BLODA.

Thoughts below partly for my own reference, and partly in case anyone
else – including but not limited to Panos! – manages to take things
further before I do.

I can't see anything obviously wrong here. There's two key oddities
that might be causing problems, though:

- Cygwin is installed in `C:\Program Files\Cygwin`; that _should_
work, but it's atypical, and spaces in filenames are a common source
of problems.

- This is a relatively old installation; I've not checked anything
else, but Cygwin Git v2.21.0-1 was released in May 2019 and there have
been a bunch of updates since then. I can't remember anything with
these symptoms from that time, however.

I'm also curious about the Git configuration here, as I can see a
bunch of ways that could cause problems. I don't have the Cygwin bin
directory in my path to test this immediately, but for example `git
branch -a` will try to call a pager – `less` by default` – so I could
imagine there being a PATH problem or similar that's resulting in a
duff pager call that's eating the output.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Git shows nothing in cmd.exe
  2020-11-10 12:56     ` Adam Dinwoodie
@ 2020-11-10 13:35       ` KAVALAGIOS Panagiotis (EEAS-EXT)
  2020-11-10 16:13         ` Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: KAVALAGIOS Panagiotis (EEAS-EXT) @ 2020-11-10 13:35 UTC (permalink / raw)
  To: Adam Dinwoodie, cygwin

> From: Cygwin <cygwin-bounces@cygwin.com> On Behalf Of Adam
> Dinwoodie
> Sent: 10 November 2020 13:57
> Subject: Re: Git shows nothing in cmd.exe
> 
> Thoughts below partly for my own reference, and partly in case anyone else
> – including but not limited to Panos! – manages to take things further before
> I do.
> 
> I can't see anything obviously wrong here. There's two key oddities that
> might be causing problems, though:
> 
> - Cygwin is installed in `C:\Program Files\Cygwin`; that _should_ work, but it's
> atypical, and spaces in filenames are a common source of problems.
> 
> - This is a relatively old installation; I've not checked anything else, but Cygwin
> Git v2.21.0-1 was released in May 2019 and there have been a bunch of
> updates since then. I can't remember anything with these symptoms from
> that time, however.
> 
> I'm also curious about the Git configuration here, as I can see a bunch of ways
> that could cause problems. I don't have the Cygwin bin directory in my path
> to test this immediately, but for example `git branch -a` will try to call a pager
> – `less` by default` – so I could imagine there being a PATH problem or similar
> that's resulting in a duff pager call that's eating the output.

Adam, thank you very much! You found our issue. It is the "less" command from GnuWin32 that caused the problem:

C:\>where less
C:\Program Files (x86)\GnuWin32\bin\less.exe
C:\Program Files\Cygwin\bin\less.exe

C:\>rename "C:\Program Files (x86)\GnuWin32\bin\less.exe" less-OLD.exe

C:\>cd dev\Projects\TSSO_WKS\tsso-workstation-configuration

C:\DEV\Projects\TSSO_WKS\tsso-workstation-configuration>git branch -a
* master
  remotes/origin/master

It now displays correctly the branches.

Panos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git shows nothing in cmd.exe
  2020-11-10 13:35       ` KAVALAGIOS Panagiotis (EEAS-EXT)
@ 2020-11-10 16:13         ` Brian Inglis
  2020-11-11  9:28           ` KAVALAGIOS Panagiotis (EEAS-EXT)
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2020-11-10 16:13 UTC (permalink / raw)
  To: cygwin

On 2020-11-10 06:35, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
>> From: Cygwin <cygwin-bounces@cygwin.com> On Behalf Of Adam
>> Dinwoodie
>> Sent: 10 November 2020 13:57
>> Subject: Re: Git shows nothing in cmd.exe
>>
>> Thoughts below partly for my own reference, and partly in case anyone else
>> – including but not limited to Panos! – manages to take things further before
>> I do.
>>
>> I can't see anything obviously wrong here. There's two key oddities that
>> might be causing problems, though:
>>
>> - Cygwin is installed in `C:\Program Files\Cygwin`; that _should_ work, but it's
>> atypical, and spaces in filenames are a common source of problems.
>>
>> - This is a relatively old installation; I've not checked anything else, but Cygwin
>> Git v2.21.0-1 was released in May 2019 and there have been a bunch of
>> updates since then. I can't remember anything with these symptoms from
>> that time, however.
>>
>> I'm also curious about the Git configuration here, as I can see a bunch of ways
>> that could cause problems. I don't have the Cygwin bin directory in my path
>> to test this immediately, but for example `git branch -a` will try to call a pager
>> – `less` by default` – so I could imagine there being a PATH problem or similar
>> that's resulting in a duff pager call that's eating the output.
> 
> Adam, thank you very much! You found our issue. It is the "less" command from GnuWin32 that caused the problem:
> 
> C:\>where less
> C:\Program Files (x86)\GnuWin32\bin\less.exe
> C:\Program Files\Cygwin\bin\less.exe
> 
> C:\>rename "C:\Program Files (x86)\GnuWin32\bin\less.exe" less-OLD.exe
> 
> C:\>cd dev\Projects\TSSO_WKS\tsso-workstation-configuration
> 
> C:\DEV\Projects\TSSO_WKS\tsso-workstation-configuration>git branch -a
> * master
>   remotes/origin/master
> 
> It now displays correctly the branches.

Gnuwin32 *latest* package updates seem to be 10 years ago, some nearly 20.
Suggest deleting those and using current *mingw64*/msys Windows tools instead as
they are maintained with recent security fixes.
You should also be careful with PATHs using different toolchains: switch them
completely, or layer them carefully, to avoid these issues.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Git shows nothing in cmd.exe
  2020-11-10 16:13         ` Brian Inglis
@ 2020-11-11  9:28           ` KAVALAGIOS Panagiotis (EEAS-EXT)
  2020-11-11 10:43             ` Andrey Repin
  0 siblings, 1 reply; 7+ messages in thread
From: KAVALAGIOS Panagiotis (EEAS-EXT) @ 2020-11-11  9:28 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> From: Cygwin <cygwin-bounces@cygwin.com> On Behalf Of Brian Inglis
> Sent: 10 November 2020 17:13
> Subject: Re: Git shows nothing in cmd.exe
> 
> Gnuwin32 *latest* package updates seem to be 10 years ago, some nearly
> 20.
> Suggest deleting those and using current *mingw64*/msys Windows tools
> instead as they are maintained with recent security fixes.
> You should also be careful with PATHs using different toolchains: switch them
> completely, or layer them carefully, to avoid these issues.

You are absolutely right! This is what we are going to do. We will remove that package from our machines.

PATH is indeed yet another headache. We are trying to prepend or append entries to set correctly the behaviour by overriding other applications to no avail. Issues can still be faced.

Panos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git shows nothing in cmd.exe
  2020-11-11  9:28           ` KAVALAGIOS Panagiotis (EEAS-EXT)
@ 2020-11-11 10:43             ` Andrey Repin
  0 siblings, 0 replies; 7+ messages in thread
From: Andrey Repin @ 2020-11-11 10:43 UTC (permalink / raw)
  To: KAVALAGIOS Panagiotis (EEAS-EXT), cygwin

Greetings, KAVALAGIOS Panagiotis (EEAS-EXT)!

> PATH is indeed yet another headache. We are trying to prepend or append
> entries to set correctly the behaviour by overriding other applications to
> no avail. Issues can still be faced.

This is why I do

@ECHO OFF

SET OLDPATH=%[PATH]
SET _CBIN=%@RTRIM[\,%@PATH[%@FULL["%~0"]]]
SET _CLBIN=%@RTRIM[\,%@PATH[%[_CBIN]]]/usr/local/bin
SET PATH=%[_CLBIN];%[_CBIN]
DO _path IN /T";" /L %[OLDPATH]
  IFF "%[_path]" == "%[_CLBIN]" THEN
    CONTINUE
  ENDIFF
  IFF "%[_path]" == "%[_CBIN]" THEN
    CONTINUE
  ENDIFF

  SET PATH=%[PATH];%[_path]
ENDDO
UNSET OLDPATH _CBIN _path

in my cygwin startup wrapper.

The regular path do contain /bin but not at the front.


-- 
With best regards,
Andrey Repin
Wednesday, November 11, 2020 13:37:47

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-11 10:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 10:35 Git shows nothing in cmd.exe KAVALAGIOS Panagiotis (EEAS-EXT)
2020-11-10 12:03 ` Adam Dinwoodie
     [not found]   ` <72f4f32d00e44071afbaa74b6b77ebad@BELBRU-EXMP101.eeas.europa.eu>
2020-11-10 12:56     ` Adam Dinwoodie
2020-11-10 13:35       ` KAVALAGIOS Panagiotis (EEAS-EXT)
2020-11-10 16:13         ` Brian Inglis
2020-11-11  9:28           ` KAVALAGIOS Panagiotis (EEAS-EXT)
2020-11-11 10:43             ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).