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

Re: Adding color to git-add--interactive

From
Jeff King <peff@peff.net>
Date
Oct 9, 2007, 23:40 UTC
Message-ID
<20071009234020.GA20952@coredump.intra.peff.net>
In-Reply-To
<91EBB71E-BB4E-4089-8C33-6B0C4A61223A@steelskies.com>
On Tue, Oct 09, 2007 at 02:06:31PM +0100, Jonathan del Strother wrote:
Show 8 quoted lines
> For me at least, adding color would make the interactive mode far more
> readable.   I hacked in basic color support (just coloring PROMPT &
> HEADER in list_and_choose, and the "Stage this hunk?" prompt) - which
> helped a lot - but then reached the limits of my perl knowledge.  For
> instance, I can't see a sensible way of reusing git-svn's
> log_use_color function without importing the entire file, and I can't
> figure out how you'd go about diff-coloring the hunks.  Is anyone with
> more perl knowledge than me interested in taking this on?
Why don't you post what you have, and we can make comments on it?

As far as reusing code from git-svn, there is a 'Git.pm' module in the perl/ subdirectory. You can move the code there and 'use Git' in git-add--interactive.perl (git-svn already uses it).

-Peff
Previous: Wincent ColaiutaNext: Johannes Schindelin
Message 5 of 8 in “Adding color to git-add--interactive”
  1. Jonathan del StrotherOct 9, 2007
  2. Wincent ColaiutaOct 9, 2007
  3. Johannes SchindelinOct 9, 2007
  4. Wincent ColaiutaOct 9, 2007
  5. Jeff KingOct 9, 2007
  6. Johannes SchindelinOct 10, 2007
  7. Jeff KingOct 10, 2007
  8. Alex RiesenOct 10, 2007

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.