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

Adding color to git-add--interactive

From
Jonathan del Strother <maillist@steelskies.com>
Date
Oct 9, 2007, 13:06 UTC
Message-ID
<91EBB71E-BB4E-4089-8C33-6B0C4A61223A@steelskies.com>

I find git-add--interactive incredibly awkward to use, mostly due to the lack of visual differentiation as you type in a sequence of commands. For example, when stepping through hunks to patch, every time it shows a new hunk I have to carefully scan up the screen to find where the hunk starts, before I can actually start reading what's contained in that hunk.

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?

Or am I alone in finding interactive mode basically unreadable? Jon

Next: Wincent Colaiuta
Message 1 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.