Camaleón <[email protected]> writes: ... > The mass-block changes made by Javier make it difficult to see what > has been going on with the original file:
I had a quick look at some of these changes, and thought that there
ought to be a way of extracting the sense from the noise. So I've had a
play with git diff textconv's and come up with something that may help a
bit.
Attached you'll find a hacky perl script (sloppy_po.pl) which strips out
CR-LFs and trailing spaces, and to joins msg* chunks together so that
the changes in line-breaks go away.
If you configure git to use that for .po diffs, then the real
differences are revealed. One does that by adding the following to
.git/info/attributes:
=-=-=-=-
*.po diff=po
=-=-=-=-
and this to .git/config:
=-=-=-=-
[diff "po"]
textconv = ./sloppy_po.pl
=-=-=-=-
(assuming you're putting the script in the repo)
Having done that you'll get a much shorter diff:
$ git diff efa9821ab..5878a44af | wc -l
182
rather than what it's like wthout the textconv stuff:
$ git diff efa9821ab..5878a44af --no-textconv | wc -l
9674
The output of git diff --color-words is then very revealing.
Of course the resulting patch is not directly applicable to the code,
becuase the mutli-line msg blocks have been glued into single, long,
lines but it does reveal what really changed ... which is basically a
few 'BIOS' to 'BIOS/UEFI' replacements, some whitespace fixes, and the
end of the file being trimmed off.
HTH
Cheers, Phil.
signature.asc
Description: PGP signature
#!/usr/bin/perl
my $scratch = "";
while(<>) {
s/\s*\r?\n$// ;
if (/^(msg\w* .*)"$/) {
$scratch .= $1 ;
next ;
}
if ("$scratch" && /"(.*)"$/) {
$scratch .= $1 ;
next ;
}
if ("$scratch") {
print $scratch . "\"\n" ;
$scratch = "" ;
}
print $_ . "\n" ;
}
-- |)| Philip Hands [+44 (0)20 8530 9560] HANDS.COM Ltd. |-| http://www.hands.com/ http://ftp.uk.debian.org/ |(| Hugo-Klemm-Strasse 34, 21075 Hamburg, GERMANY

