{"thread":{"id":"10215","subject":"Adding color to git-add--interactive","startedAt":"2007-10-09T13:06:31Z","lastAt":"2007-10-10T21:09:58Z","messageCount":8,"participants":["Jonathan del Strother","Wincent Colaiuta","Johannes Schindelin","Jeff King","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55274","messageId":"91EBB71E-BB4E-4089-8C33-6B0C4A61223A@steelskies.com","threadId":"10215","inReplyTo":null,"subject":"Adding color to git-add--interactive","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2007-10-09T13:06:31Z","receivedAt":"2007-10-09T13:06:31Z","isPatch":false,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"I find git-add--interactive incredibly awkward to use, mostly due to  \nthe lack of visual differentiation as you type in a sequence of  \ncommands.  For example, when stepping through hunks to patch, every  \ntime it shows a new hunk I have to carefully scan up the screen to  \nfind where the hunk starts, before I can actually start reading what's  \ncontained in that hunk.\n\nFor me at least, adding color would make the interactive mode far more  \nreadable.   I hacked in basic color support (just coloring PROMPT &  \nHEADER in list_and_choose, and the \"Stage this hunk?\" prompt) - which  \nhelped a lot - but then reached the limits of my perl knowledge.  For  \ninstance, I can't see a sensible way of reusing git-svn's  \nlog_use_color function without importing the entire file, and I can't  \nfigure out how you'd go about diff-coloring the hunks.  Is anyone with  \nmore perl knowledge than me interested in taking this on?\n\nOr am I alone in finding interactive mode basically unreadable?\nJon\n"},{"id":"55282","messageId":"A59A0321-9E29-4857-AF03-E6226C45E87C@wincent.com","threadId":"10215","inReplyTo":"91EBB71E-BB4E-4089-8C33-6B0C4A61223A@steelskies.com","subject":"Re: Adding color to git-add--interactive","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2007-10-09T13:31:29Z","receivedAt":"2007-10-09T13:31:29Z","isPatch":false,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 9/10/2007, a las 15:06, Jonathan del Strother escribió:\n\n> Or am I alone in finding interactive mode basically unreadable?\n\nI don't think you're alone. Compared with the nice colorized output  \nfrom things like git-status, git-log, git-diff and friends, the  \noutput of \"git-add --interactive\" is decidedly hard to read.\n\nCheers,\nWincent\n"},{"id":"55283","messageId":"Pine.LNX.4.64.0710091503460.4174@racer.site","threadId":"10215","inReplyTo":"A59A0321-9E29-4857-AF03-E6226C45E87C@wincent.com","subject":"Re: Adding color to git-add--interactive","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-09T14:04:35Z","receivedAt":"2007-10-09T14:04:35Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 9 Oct 2007, Wincent Colaiuta wrote:\n\n> El 9/10/2007, a las 15:06, Jonathan del Strother escribi?:\n> \n> > Or am I alone in finding interactive mode basically unreadable?\n> \n> I don't think you're alone. Compared with the nice colorized output from \n> things like git-status, git-log, git-diff and friends, the output of \n> \"git-add --interactive\" is decidedly hard to read.\n\nAnd since git-add--interactive is still a script, there is no excuse: \nproviding a patch should take the same time and amount of work as \ncomplaining about the lack of colour.\n\nCiao,\nDscho\n"},{"id":"55288","messageId":"4D8B16C8-C543-4E67-B0D1-F737A4D14B25@wincent.com","threadId":"10215","inReplyTo":"Pine.LNX.4.64.0710091503460.4174@racer.site","subject":"Re: Adding color to git-add--interactive","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2007-10-09T14:44:51Z","receivedAt":"2007-10-09T14:44:51Z","isPatch":false,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 9/10/2007, a las 16:04, Johannes Schindelin escribió:\n\n> On Tue, 9 Oct 2007, Wincent Colaiuta wrote:\n>\n>> El 9/10/2007, a las 15:06, Jonathan del Strother escribió:\n>>\n>>> Or am I alone in finding interactive mode basically unreadable?\n>>\n>> I don't think you're alone. Compared with the nice colorized  \n>> output from\n>> things like git-status, git-log, git-diff and friends, the output of\n>> \"git-add --interactive\" is decidedly hard to read.\n>\n> And since git-add--interactive is still a script, there is no excuse:\n> providing a patch should take the same time and amount of work as\n> complaining about the lack of colour.\n\nWhy so combative, Johannes? I merely answered one of Jonathan's  \nquestions. Nobody has proffered any \"excuses\".\n\nAnd in any case, you're exaggerating. Jonathan said that he's already  \ninvested time in trying to get it working, most certainly more time  \nthan it has taken he, you or I, to write the emails in this thread,  \nand he's gotten as far as his Perl knowledge permits him.\n\nCheers,\nWincent\n"},{"id":"55325","messageId":"20071009234020.GA20952@coredump.intra.peff.net","threadId":"10215","inReplyTo":"91EBB71E-BB4E-4089-8C33-6B0C4A61223A@steelskies.com","subject":"Re: Adding color to git-add--interactive","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-10-09T23:40:20Z","receivedAt":"2007-10-09T23:40:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 09, 2007 at 02:06:31PM +0100, Jonathan del Strother wrote:\n\n> For me at least, adding color would make the interactive mode far more\n> readable.   I hacked in basic color support (just coloring PROMPT &\n> HEADER in list_and_choose, and the \"Stage this hunk?\" prompt) - which\n> helped a lot - but then reached the limits of my perl knowledge.  For\n> instance, I can't see a sensible way of reusing git-svn's\n> log_use_color function without importing the entire file, and I can't\n> figure out how you'd go about diff-coloring the hunks.  Is anyone with\n> more perl knowledge than me interested in taking this on?\n\nWhy don't you post what you have, and we can make comments on it?\n\nAs far as reusing code from git-svn, there is a 'Git.pm' module in the\nperl/ subdirectory. You can move the code there and 'use Git' in\ngit-add--interactive.perl (git-svn already uses it).\n\n-Peff\n"},{"id":"55376","messageId":"Pine.LNX.4.64.0710101604350.4174@racer.site","threadId":"10215","inReplyTo":"20071009234020.GA20952@coredump.intra.peff.net","subject":"Re: Adding color to git-add--interactive","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-10T15:06:09Z","receivedAt":"2007-10-10T15:06:09Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 9 Oct 2007, Jeff King wrote:\n\n> On Tue, Oct 09, 2007 at 02:06:31PM +0100, Jonathan del Strother wrote:\n> \n> > For me at least, adding color would make the interactive mode far more\n> > readable.   I hacked in basic color support (just coloring PROMPT &\n> > HEADER in list_and_choose, and the \"Stage this hunk?\" prompt) - which\n> > helped a lot - but then reached the limits of my perl knowledge.  For\n> > instance, I can't see a sensible way of reusing git-svn's\n> > log_use_color function without importing the entire file, and I can't\n> > figure out how you'd go about diff-coloring the hunks.  Is anyone with\n> > more perl knowledge than me interested in taking this on?\n> \n> Why don't you post what you have, and we can make comments on it?\n> \n> As far as reusing code from git-svn, there is a 'Git.pm' module in the\n> perl/ subdirectory. You can move the code there and 'use Git' in\n> git-add--interactive.perl (git-svn already uses it).\n\nI think the reason git-add--interactive does not use it is that some \npeople (me included) experienced heavy problems with perl modules.  \nHowever, I do not recall to which extent they have been solved.  I guess \nwhen git-add--interactive goes Git.pm and stops working for me, I'll do my \nfamous \"aargh, I'll just make it a builtin\" song.\n\nCiao,\nDscho\n"},{"id":"55390","messageId":"20071010170621.GA5444@coredump.intra.peff.net","threadId":"10215","inReplyTo":"Pine.LNX.4.64.0710101604350.4174@racer.site","subject":"Re: Adding color to git-add--interactive","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-10-10T17:06:21Z","receivedAt":"2007-10-10T17:06:21Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 10, 2007 at 04:06:09PM +0100, Johannes Schindelin wrote:\n\n> I think the reason git-add--interactive does not use it is that some \n> people (me included) experienced heavy problems with perl modules.  \n> However, I do not recall to which extent they have been solved.  I guess \n> when git-add--interactive goes Git.pm and stops working for me, I'll do my \n> famous \"aargh, I'll just make it a builtin\" song.\n\nI had thought this was the case, too (and in fact, I started to write\n\"we don't have a good solution for sharing perl code\"), but it looks\nlike git-remote, git-svn, and git-send-email are all using Git.pm these\ndays.\n\n-Peff\n"},{"id":"55410","messageId":"20071010210958.GA16635@steel.home","threadId":"10215","inReplyTo":"20071010170621.GA5444@coredump.intra.peff.net","subject":"Re: Adding color to git-add--interactive","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-10-10T21:09:58Z","receivedAt":"2007-10-10T21:09:58Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Jeff King, Wed, Oct 10, 2007 19:06:21 +0200:\n> On Wed, Oct 10, 2007 at 04:06:09PM +0100, Johannes Schindelin wrote:\n> \n> > I think the reason git-add--interactive does not use it is that some \n> > people (me included) experienced heavy problems with perl modules.  \n> > However, I do not recall to which extent they have been solved.  I guess \n> > when git-add--interactive goes Git.pm and stops working for me, I'll do my \n> > famous \"aargh, I'll just make it a builtin\" song.\n> \n> I had thought this was the case, too (and in fact, I started to write\n> \"we don't have a good solution for sharing perl code\"), but it looks\n> like git-remote, git-svn, and git-send-email are all using Git.pm these\n> days.\n> \n\nAnd strangely enough, git-remote is even usable on cygwin.\nCan't say for others though.\n"}]}