* "git log" does not display refs info when executed via C# Process class on Windows
@ 2019-08-09 19:36 Cliff Schomburg
2019-08-09 19:50 ` SZEDER Gábor
0 siblings, 1 reply; 6+ messages in thread
From: Cliff Schomburg @ 2019-08-09 19:36 UTC (permalink / raw)
To: git
Hello,
I have an open Git for Windows issue here:
https://github.com/git-for-windows/git/issues/2285
"git log" works as expected from the command prompt. But when I execute it via C# Process class and read from Standard Output, the refs are missing.
Is anyone familiar with this issue? Any idea why the output to CMD and STDOUT would be different?
Thanks,
Cliff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "git log" does not display refs info when executed via C# Process class on Windows
2019-08-09 19:36 "git log" does not display refs info when executed via C# Process class on Windows Cliff Schomburg
@ 2019-08-09 19:50 ` SZEDER Gábor
2019-08-09 20:11 ` Cliff Schomburg
2019-08-09 21:34 ` Cliff Schomburg
0 siblings, 2 replies; 6+ messages in thread
From: SZEDER Gábor @ 2019-08-09 19:50 UTC (permalink / raw)
To: Cliff Schomburg; +Cc: git
On Fri, Aug 09, 2019 at 07:36:19PM +0000, Cliff Schomburg wrote:
> I have an open Git for Windows issue here:
> https://github.com/git-for-windows/git/issues/2285
>
> "git log" works as expected from the command prompt. But when I execute it via C# Process class and read from Standard Output, the refs are missing.
>
> Is anyone familiar with this issue? Any idea why the output to CMD and STDOUT would be different?
Decorations, like color and refs pointing to a commit, are for humans,
and humans read the terminal. If the command's output doesn't go to a
terminal, then no such decorations are shown by default.
Try invoking 'git log --decorate'; or, better yet, use your custom
'--format=', especially if you intend to parse the output,
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: "git log" does not display refs info when executed via C# Process class on Windows
2019-08-09 19:50 ` SZEDER Gábor
@ 2019-08-09 20:11 ` Cliff Schomburg
2019-08-09 21:34 ` Cliff Schomburg
1 sibling, 0 replies; 6+ messages in thread
From: Cliff Schomburg @ 2019-08-09 20:11 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: git
Adding --decorate gave me the desired result.
Thanks for your help!
-----Original Message-----
From: SZEDER Gábor <szeder.dev@gmail.com>
Sent: Friday, August 9, 2019 3:51 PM
To: Cliff Schomburg <clisc@microsoft.com>
Cc: git@vger.kernel.org
Subject: Re: "git log" does not display refs info when executed via C# Process class on Windows
On Fri, Aug 09, 2019 at 07:36:19PM +0000, Cliff Schomburg wrote:
> I have an open Git for Windows issue here:
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fgit-for-windows%2Fgit%2Fissues%2F2285&data=02%7C01%7Cclis
> c%40microsoft.com%7C17689ee8d32d48528c3208d71d02d8d5%7C72f988bf86f141a
> f91ab2d7cd011db47%7C1%7C0%7C637009771013658738&sdata=PKPdRI0mC65Lx
> 2J5etYnp0fyzsk%2BXSGzGBWa12BLKEE%3D&reserved=0
>
> "git log" works as expected from the command prompt. But when I execute it via C# Process class and read from Standard Output, the refs are missing.
>
> Is anyone familiar with this issue? Any idea why the output to CMD and STDOUT would be different?
Decorations, like color and refs pointing to a commit, are for humans, and humans read the terminal. If the command's output doesn't go to a terminal, then no such decorations are shown by default.
Try invoking 'git log --decorate'; or, better yet, use your custom '--format=', especially if you intend to parse the output,
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: "git log" does not display refs info when executed via C# Process class on Windows
2019-08-09 19:50 ` SZEDER Gábor
2019-08-09 20:11 ` Cliff Schomburg
@ 2019-08-09 21:34 ` Cliff Schomburg
2019-08-09 21:49 ` Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Cliff Schomburg @ 2019-08-09 21:34 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: git
Strangely, when I run this command:
Git log origin/master --pretty=oneline --decorate -1
I get the format I want from STDOUT. However, when I try to filter it to show only the tag refs:
Git log origin/master --pretty=oneline --decorate --decorate-refs=^tag* -1
No refs are returned to standard output again. Only on the command line.
Does --decorate-refs not return to STDOUT?
Thanks,
Cliff
-----Original Message-----
From: SZEDER Gábor <szeder.dev@gmail.com>
Sent: Friday, August 9, 2019 3:51 PM
To: Cliff Schomburg <clisc@microsoft.com>
Cc: git@vger.kernel.org
Subject: Re: "git log" does not display refs info when executed via C# Process class on Windows
On Fri, Aug 09, 2019 at 07:36:19PM +0000, Cliff Schomburg wrote:
> I have an open Git for Windows issue here:
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fgit-for-windows%2Fgit%2Fissues%2F2285&data=02%7C01%7Cclis
> c%40microsoft.com%7C17689ee8d32d48528c3208d71d02d8d5%7C72f988bf86f141a
> f91ab2d7cd011db47%7C1%7C0%7C637009771013658738&sdata=PKPdRI0mC65Lx
> 2J5etYnp0fyzsk%2BXSGzGBWa12BLKEE%3D&reserved=0
>
> "git log" works as expected from the command prompt. But when I execute it via C# Process class and read from Standard Output, the refs are missing.
>
> Is anyone familiar with this issue? Any idea why the output to CMD and STDOUT would be different?
Decorations, like color and refs pointing to a commit, are for humans, and humans read the terminal. If the command's output doesn't go to a terminal, then no such decorations are shown by default.
Try invoking 'git log --decorate'; or, better yet, use your custom '--format=', especially if you intend to parse the output,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "git log" does not display refs info when executed via C# Process class on Windows
2019-08-09 21:34 ` Cliff Schomburg
@ 2019-08-09 21:49 ` Junio C Hamano
2019-08-09 22:16 ` Cliff Schomburg
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2019-08-09 21:49 UTC (permalink / raw)
To: Cliff Schomburg; +Cc: SZEDER Gábor, git
Cliff Schomburg <clisc@microsoft.com> writes:
> Strangely, when I run this command:
>
> Git log origin/master --pretty=oneline --decorate -1
>
> I get the format I want from STDOUT. However, when I try to filter it to show only the tag refs:
>
> Git log origin/master --pretty=oneline --decorate --decorate-refs=^tag* -1
>
> No refs are returned to standard output again. Only on the command line.
>
> Does --decorate-refs not return to STDOUT?
If you are asking for tags, which does not begin with a caret "^",
perhaps drop "^" from the pattern?
The pattern is supposed to be wildmatch pattern, so it is already
left anchored, e.g. --decorate-refs=ag* won't find any tag.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: "git log" does not display refs info when executed via C# Process class on Windows
2019-08-09 21:49 ` Junio C Hamano
@ 2019-08-09 22:16 ` Cliff Schomburg
0 siblings, 0 replies; 6+ messages in thread
From: Cliff Schomburg @ 2019-08-09 22:16 UTC (permalink / raw)
To: gitster; +Cc: SZEDER Gábor, git
Thanks, I will try that as well. Strange it works on command line but not STDOUT though.
-----Original Message-----
From: Junio C Hamano <gitster@pobox.com>
Sent: Friday, August 9, 2019 5:50 PM
To: Cliff Schomburg <clisc@microsoft.com>
Cc: SZEDER Gábor <szeder.dev@gmail.com>; git@vger.kernel.org
Subject: Re: "git log" does not display refs info when executed via C# Process class on Windows
Cliff Schomburg <clisc@microsoft.com> writes:
> Strangely, when I run this command:
>
> Git log origin/master --pretty=oneline --decorate -1
>
> I get the format I want from STDOUT. However, when I try to filter it to show only the tag refs:
>
> Git log origin/master --pretty=oneline --decorate
> --decorate-refs=^tag* -1
>
> No refs are returned to standard output again. Only on the command line.
>
> Does --decorate-refs not return to STDOUT?
If you are asking for tags, which does not begin with a caret "^", perhaps drop "^" from the pattern?
The pattern is supposed to be wildmatch pattern, so it is already left anchored, e.g. --decorate-refs=ag* won't find any tag.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-09 22:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 19:36 "git log" does not display refs info when executed via C# Process class on Windows Cliff Schomburg
2019-08-09 19:50 ` SZEDER Gábor
2019-08-09 20:11 ` Cliff Schomburg
2019-08-09 21:34 ` Cliff Schomburg
2019-08-09 21:49 ` Junio C Hamano
2019-08-09 22:16 ` Cliff Schomburg
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).