{"thread":{"id":"9706","subject":"[StGit] How do I get colored diff output?","startedAt":"2007-08-30T12:32:22Z","lastAt":"2007-08-31T15:14:49Z","messageCount":5,"participants":["Peter Baumann","Catalin Marinas","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"51906","messageId":"20070830123222.GG5050@xp.machine.xx","threadId":"9706","inReplyTo":null,"subject":"[StGit] How do I get colored diff output?","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2007-08-30T12:32:22Z","receivedAt":"2007-08-30T12:32:22Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"Hi,\n\nIs there a way to get colored diff output, preferable from the native\ngit diff without having to specify stg diff -O --color everytime?\nIt seems that stg doesn't honor color.diff config entry, so I am a\nlittle lost.\n\n(And yes I now that I could use the pager setting given in examples/gitconfig,\n\n\tstgit.pager = filterdiff --annotate | colordiff | less -FRX\n\n but I really prefere the native git coloring, which looks a loot nicer\n and does also highlight traling whitespace)\n\n-Peter\n"},{"id":"51913","messageId":"tnx3ay1w40p.fsf@arm.com","threadId":"9706","inReplyTo":"20070830123222.GG5050@xp.machine.xx","subject":"Re: [StGit] How do I get colored diff output?","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2007-08-30T13:22:46Z","receivedAt":"2007-08-30T13:22:46Z","isPatch":false,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Peter Baumann <waste.manager@gmx.de> wrote:\n> Is there a way to get colored diff output, preferable from the native\n> git diff without having to specify stg diff -O --color everytime?\n> It seems that stg doesn't honor color.diff config entry, so I am a\n> little lost.\n>\n> (And yes I now that I could use the pager setting given in examples/gitconfig,\n>\n> \tstgit.pager = filterdiff --annotate | colordiff | less -FRX\n>\n>  but I really prefere the native git coloring, which looks a loot nicer\n>  and does also highlight traling whitespace)\n\nThere isn't any other way at the moment. There were ideas of adding\nsupport for default command line options for various commands but I\nhaven't looked at this.\n\nI now tried the example stgit.pager option and it looks bad indeed. In\nthe meantime, there is a diffcol.sh script in the contrib directory, I\nuse this instead and it looks much nicer.\n\n-- \nCatalin\n"},{"id":"51914","messageId":"20070830135909.GH5050@xp.machine.xx","threadId":"9706","inReplyTo":"tnx3ay1w40p.fsf@arm.com","subject":"Re: [StGit] How do I get colored diff output?","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2007-08-30T13:59:09Z","receivedAt":"2007-08-30T13:59:09Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"On Thu, Aug 30, 2007 at 02:22:46PM +0100, Catalin Marinas wrote:\n> Peter Baumann <waste.manager@gmx.de> wrote:\n> > Is there a way to get colored diff output, preferable from the native\n> > git diff without having to specify stg diff -O --color everytime?\n> > It seems that stg doesn't honor color.diff config entry, so I am a\n> > little lost.\n> >\n> > (And yes I now that I could use the pager setting given in examples/gitconfig,\n> >\n> > \tstgit.pager = filterdiff --annotate | colordiff | less -FRX\n> >\n> >  but I really prefere the native git coloring, which looks a loot nicer\n> >  and does also highlight traling whitespace)\n> \n> There isn't any other way at the moment. There were ideas of adding\n> support for default command line options for various commands but I\n> haven't looked at this.\n> \n> I now tried the example stgit.pager option and it looks bad indeed. In\n> the meantime, there is a diffcol.sh script in the contrib directory, I\n> use this instead and it looks much nicer.\n> \n\nAh. I didn't find that while searching for the color ouput.\n\nThx for your help,\nPeter\n"},{"id":"51924","messageId":"fb6sst$6rt$2@sea.gmane.org","threadId":"9706","inReplyTo":"tnx3ay1w40p.fsf@arm.com","subject":"Re: [StGit] How do I get colored diff output?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-08-30T16:57:04Z","receivedAt":"2007-08-30T16:57:04Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Catalin Marinas wrote:\n\n> I now tried the example stgit.pager option and it looks bad indeed. In\n> the meantime, there is a diffcol.sh script in the contrib directory, I\n> use this instead and it looks much nicer.\n\nThat means it should be not removed even though git-diff learned --color...\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"52042","messageId":"tnxveavviqe.fsf@arm.com","threadId":"9706","inReplyTo":"fb6sst$6rt$2@sea.gmane.org","subject":"Re: [StGit] How do I get colored diff output?","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2007-08-31T15:14:49Z","receivedAt":"2007-08-31T15:14:49Z","isPatch":false,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> wrote:\n> Catalin Marinas wrote:\n>\n>> I now tried the example stgit.pager option and it looks bad indeed. In\n>> the meantime, there is a diffcol.sh script in the contrib directory, I\n>> use this instead and it looks much nicer.\n>\n> That means it should be not removed even though git-diff learned\n> --color...\n\nIt looks nicer than \"filterdiff | colordiff\" (and probably pretty\nsimilar to the git-diff --color output).\n\nIt shouldn't be removed yet because there is no support in StGIT to\npass these options automatically. Since StGIT uses git-diff-tree/index\ndirectly, always passing the --color option to these tools is not\nfeasible as they cannot detect whether the output is tty or file. This\nfunctionality is currently handled by the pydoc.pager function.\n\nUsing git-diff would require a bit of work as well since StGIT first\ncaptures the output and displays it afterwards via pydoc.pager. We\nmight change this at some point since GIT now has proper support for\nPAGER.\n\n-- \nCatalin\n"}]}