All of lore.kernel.org
 help / color / mirror / Atom feed
* bug/feature request: apply textconv in "git add -p" diff output
@ 2009-06-20  7:17 Nguyen Thai Ngoc Duy
  2009-06-20  7:58 ` Santi Béjar
  2009-06-20  9:41 ` Michael J Gruber
  0 siblings, 2 replies; 4+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2009-06-20  7:17 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I use git to manage bdf font files. It it quite cryptic so textconv
for diff output makes it much easier to keep track of changes. The
only problem is that "git add -p" does not seems to use textconv, so I
have to run in parallel "git diff" and "git add -p", then add chunks
accordingly. Can somebody add textconv support to "git add -p" please?
I'm not so good at Perl to do the job.

Thanks,
-- 
Duy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug/feature request: apply textconv in "git add -p" diff output
  2009-06-20  7:17 bug/feature request: apply textconv in "git add -p" diff output Nguyen Thai Ngoc Duy
@ 2009-06-20  7:58 ` Santi Béjar
  2009-06-20  9:41 ` Michael J Gruber
  1 sibling, 0 replies; 4+ messages in thread
From: Santi Béjar @ 2009-06-20  7:58 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: Git Mailing List

2009/6/20 Nguyen Thai Ngoc Duy <pclouds@gmail.com>
>
> Hi,
>
> I use git to manage bdf font files. It it quite cryptic so textconv
> for diff output makes it much easier to keep track of changes. The
> only problem is that "git add -p" does not seems to use textconv, so I
> have to run in parallel "git diff" and "git add -p", then add chunks
> accordingly. Can somebody add textconv support to "git add -p" please?
> I'm not so good at Perl to do the job.

While at it it would be great if one could toggle between normal diff
and --color-words in "git add -p". I tried to do it but the logic in
"git add -p" is base on lines (and not chuncks) and git diff
--color-lines changes them and my perl-fu is not so good either.

Thanks in advance,
Santi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug/feature request: apply textconv in "git add -p" diff output
  2009-06-20  7:17 bug/feature request: apply textconv in "git add -p" diff output Nguyen Thai Ngoc Duy
  2009-06-20  7:58 ` Santi Béjar
@ 2009-06-20  9:41 ` Michael J Gruber
  2009-06-21 12:17   ` Nguyen Thai Ngoc Duy
  1 sibling, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2009-06-20  9:41 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: Git Mailing List

Nguyen Thai Ngoc Duy venit, vidit, dixit 20.06.2009 09:17:
> Hi,
> 
> I use git to manage bdf font files. It it quite cryptic so textconv
> for diff output makes it much easier to keep track of changes. The
> only problem is that "git add -p" does not seems to use textconv, so I
> have to run in parallel "git diff" and "git add -p", then add chunks
> accordingly. Can somebody add textconv support to "git add -p" please?
> I'm not so good at Perl to do the job.

I don't think this is possible: textconv filters are meant to produce
easily readable output from diff, but in no way are they required to be
injective mappings. So, textconv output cannot to be used in order to
specify a patch uniquely.

The appropriate approach is to use smudge/clean filters. They are
mutually inverse. And, in fact, I just checked: add -p uses the cleaned
version. So, if clean converts to "something textual" which gives you
readable diffs and meaningful stats (and smudge converts to binary bdf)
then that is the way to go.

Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug/feature request: apply textconv in "git add -p" diff output
  2009-06-20  9:41 ` Michael J Gruber
@ 2009-06-21 12:17   ` Nguyen Thai Ngoc Duy
  0 siblings, 0 replies; 4+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2009-06-21 12:17 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Git Mailing List

On Sat, Jun 20, 2009 at 7:41 PM, Michael J
Gruber<git@drmicha.warpmail.net> wrote:
> Nguyen Thai Ngoc Duy venit, vidit, dixit 20.06.2009 09:17:
>> Hi,
>>
>> I use git to manage bdf font files. It it quite cryptic so textconv
>> for diff output makes it much easier to keep track of changes. The
>> only problem is that "git add -p" does not seems to use textconv, so I
>> have to run in parallel "git diff" and "git add -p", then add chunks
>> accordingly. Can somebody add textconv support to "git add -p" please?
>> I'm not so good at Perl to do the job.
>
> I don't think this is possible: textconv filters are meant to produce
> easily readable output from diff, but in no way are they required to be
> injective mappings. So, textconv output cannot to be used in order to
> specify a patch uniquely.
>
> The appropriate approach is to use smudge/clean filters. They are
> mutually inverse. And, in fact, I just checked: add -p uses the cleaned
> version. So, if clean converts to "something textual" which gives you
> readable diffs and meaningful stats (and smudge converts to binary bdf)
> then that is the way to go.

Right, I did not notice because mine was line by line translation.
I'll convert it to clean filter. Thanks.
-- 
Duy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-21 12:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-20  7:17 bug/feature request: apply textconv in "git add -p" diff output Nguyen Thai Ngoc Duy
2009-06-20  7:58 ` Santi Béjar
2009-06-20  9:41 ` Michael J Gruber
2009-06-21 12:17   ` Nguyen Thai Ngoc Duy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.