{"thread":{"id":"19874","subject":"bug/feature request: apply textconv in \"git add -p\" diff output","startedAt":"2009-06-20T07:17:41Z","lastAt":"2009-06-21T12:17:56Z","messageCount":4,"participants":["Nguyen Thai Ngoc Duy","Santi Béjar","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116663","messageId":"fcaeb9bf0906200017x6cc63c29q5515c11c202e424e@mail.gmail.com","threadId":"19874","inReplyTo":null,"subject":"bug/feature request: apply textconv in \"git add -p\" diff output","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2009-06-20T07:17:41Z","receivedAt":"2009-06-20T07:17:41Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Hi,\n\nI use git to manage bdf font files. It it quite cryptic so textconv\nfor diff output makes it much easier to keep track of changes. The\nonly problem is that \"git add -p\" does not seems to use textconv, so I\nhave to run in parallel \"git diff\" and \"git add -p\", then add chunks\naccordingly. Can somebody add textconv support to \"git add -p\" please?\nI'm not so good at Perl to do the job.\n\nThanks,\n-- \nDuy\n"},{"id":"116665","messageId":"adf1fd3d0906200058o3e48018fg32c0efba5e4d62a4@mail.gmail.com","threadId":"19874","inReplyTo":"fcaeb9bf0906200017x6cc63c29q5515c11c202e424e@mail.gmail.com","subject":"Re: bug/feature request: apply textconv in \"git add -p\" diff output","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2009-06-20T07:58:02Z","receivedAt":"2009-06-20T07:58:02Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2009/6/20 Nguyen Thai Ngoc Duy <pclouds@gmail.com>\n>\n> Hi,\n>\n> I use git to manage bdf font files. It it quite cryptic so textconv\n> for diff output makes it much easier to keep track of changes. The\n> only problem is that \"git add -p\" does not seems to use textconv, so I\n> have to run in parallel \"git diff\" and \"git add -p\", then add chunks\n> accordingly. Can somebody add textconv support to \"git add -p\" please?\n> I'm not so good at Perl to do the job.\n\nWhile at it it would be great if one could toggle between normal diff\nand --color-words in \"git add -p\". I tried to do it but the logic in\n\"git add -p\" is base on lines (and not chuncks) and git diff\n--color-lines changes them and my perl-fu is not so good either.\n\nThanks in advance,\nSanti\n"},{"id":"116667","messageId":"4A3CAEBB.9030107@drmicha.warpmail.net","threadId":"19874","inReplyTo":"fcaeb9bf0906200017x6cc63c29q5515c11c202e424e@mail.gmail.com","subject":"Re: bug/feature request: apply textconv in \"git add -p\" diff output","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-06-20T09:41:15Z","receivedAt":"2009-06-20T09:41:15Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Nguyen Thai Ngoc Duy venit, vidit, dixit 20.06.2009 09:17:\n> Hi,\n> \n> I use git to manage bdf font files. It it quite cryptic so textconv\n> for diff output makes it much easier to keep track of changes. The\n> only problem is that \"git add -p\" does not seems to use textconv, so I\n> have to run in parallel \"git diff\" and \"git add -p\", then add chunks\n> accordingly. Can somebody add textconv support to \"git add -p\" please?\n> I'm not so good at Perl to do the job.\n\nI don't think this is possible: textconv filters are meant to produce\neasily readable output from diff, but in no way are they required to be\ninjective mappings. So, textconv output cannot to be used in order to\nspecify a patch uniquely.\n\nThe appropriate approach is to use smudge/clean filters. They are\nmutually inverse. And, in fact, I just checked: add -p uses the cleaned\nversion. So, if clean converts to \"something textual\" which gives you\nreadable diffs and meaningful stats (and smudge converts to binary bdf)\nthen that is the way to go.\n\nMichael\n"},{"id":"116713","messageId":"fcaeb9bf0906210517s49ed029fr84d31b14b0184bb7@mail.gmail.com","threadId":"19874","inReplyTo":"4A3CAEBB.9030107@drmicha.warpmail.net","subject":"Re: bug/feature request: apply textconv in \"git add -p\" diff output","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2009-06-21T12:17:56Z","receivedAt":"2009-06-21T12:17:56Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Jun 20, 2009 at 7:41 PM, Michael J\nGruber<git@drmicha.warpmail.net> wrote:\n> Nguyen Thai Ngoc Duy venit, vidit, dixit 20.06.2009 09:17:\n>> Hi,\n>>\n>> I use git to manage bdf font files. It it quite cryptic so textconv\n>> for diff output makes it much easier to keep track of changes. The\n>> only problem is that \"git add -p\" does not seems to use textconv, so I\n>> have to run in parallel \"git diff\" and \"git add -p\", then add chunks\n>> accordingly. Can somebody add textconv support to \"git add -p\" please?\n>> I'm not so good at Perl to do the job.\n>\n> I don't think this is possible: textconv filters are meant to produce\n> easily readable output from diff, but in no way are they required to be\n> injective mappings. So, textconv output cannot to be used in order to\n> specify a patch uniquely.\n>\n> The appropriate approach is to use smudge/clean filters. They are\n> mutually inverse. And, in fact, I just checked: add -p uses the cleaned\n> version. So, if clean converts to \"something textual\" which gives you\n> readable diffs and meaningful stats (and smudge converts to binary bdf)\n> then that is the way to go.\n\nRight, I did not notice because mine was line by line translation.\nI'll convert it to clean filter. Thanks.\n-- \nDuy\n"}]}