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

Re: preview: What's cooking in git.git (Jun 2016, #10; Tue, 28)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 2, 2016, 07:32 UTC
Message-ID
<alpine.DEB.2.20.1607020926120.12947@virtualbox>
In-Reply-To
<xmqq4m8c53wk.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 29 Jun 2016, Junio C Hamano wrote:
Show 29 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Tue, 28 Jun 2016, Junio C Hamano wrote:
> >
> >> * jk/ansi-color (2016-06-23) 7 commits
> >>   (merged to 'next' on 2016-06-28 at 354989c)
> >>  + color: support strike-through attribute
> >>  + color: support "italic" attribute
> >>  + color: allow "no-" for negating attributes
> >>  + color: refactor parse_attr
> >>  + add skip_prefix_mem helper
> >>  + doc: refactor description of color format
> >>  + color: fix max-size comment
> >> 
> >>  The output coloring scheme learned two new attributes, italic and
> >>  strike, in addition to existing bold, reverse, etc.
> >> 
> >>  Will merge to 'master'.
> >
> > Please note that those "colors" do not work on Windows, at least as far as
> > I know, I only skimmed the code in set_attr():
> >
> > 	https://github.com/git/git/blob/v2.9.0/compat/winansi.c#L175-L314
> >
> > ... and it looks as if italic is plainly unsupported, and strike-through
> > is not handled.
> 
> This hopefully is a low-hanging-fruit for aspiring new developers in
> the Windows land, perhaps?

I think that winansi.c would already implement it if it were possible. Probably there are no character attributes to change the font to italic in the Win32 Console.

*me-goes-and-looks* Yep, that's the case: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682013.aspx

Show 8 quoted lines
> We do not use italic/strike as a built-in default style for
> anything, so we do not have to wait for Windows support of these two
> attributes to appear to include this topic in the next release.
> 
> After all, users on "screen", or anything that translates these ANSI
> colors via termcap/terminfo, do not get them, either.  A user may
> try using these once, notices that her terminal lacks support, and
> would move on.

Yes, this was what I was getting at: I would appreciate it, along with many Windows users, if we did not use any italic nor strike-through styles by default, even in future versions.

It is fine, of course, to offer them for users to configure. After all, in the default Git for Windows installation, the Win32 Console is not used, but MinTTY, which is a full ANSI terminal emulator (so I'd wager a guess that italic and strike-through are supported).

Not sure whether a comment in the documentation is warranted, though.

Ciao, Dscho

Previous: Junio C HamanoNext: Jeff King
Message 8 of 9 in “preview: What's cooking in git.git (Jun 2016, #10; Tue, 28)”
  1. Junio C HamanoJun 28, 2016
  2. Jeff KingJun 29, 2016
  3. Junio C HamanoJun 29, 2016
  4. Johannes SixtJun 29, 2016
  5. Jeff KingJun 30, 2016
  6. Johannes SchindelinJun 29, 2016
  7. Junio C HamanoJun 29, 2016
  8. Johannes SchindelinJul 2, 2016
  9. Jeff KingJun 30, 2016

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.