git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Cliff Schomburg <clisc@microsoft.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: RE: "git log" does not display refs info when executed via C# Process class on Windows
Date: Fri, 9 Aug 2019 20:11:33 +0000	[thread overview]
Message-ID: <BN8PR21MB11565C3CD2522EA8BB887AA9B7D60@BN8PR21MB1156.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20190809195031.GK20404@szeder.dev>

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&amp;data=02%7C01%7Cclis
> c%40microsoft.com%7C17689ee8d32d48528c3208d71d02d8d5%7C72f988bf86f141a
> f91ab2d7cd011db47%7C1%7C0%7C637009771013658738&amp;sdata=PKPdRI0mC65Lx
> 2J5etYnp0fyzsk%2BXSGzGBWa12BLKEE%3D&amp;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, 


  reply	other threads:[~2019-08-09 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-08-09 21:34   ` Cliff Schomburg
2019-08-09 21:49     ` Junio C Hamano
2019-08-09 22:16       ` Cliff Schomburg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN8PR21MB11565C3CD2522EA8BB887AA9B7D60@BN8PR21MB1156.namprd21.prod.outlook.com \
    --to=clisc@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).