Re: git-diff-files -z output
- From
- Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
- Date
- May 22, 2005, 17:32 UTC
- Message-ID
- <20050522173243.GA18500@cip.informatik.uni-erlangen.de>
- In-Reply-To
- <20050522172737.GB17570@cip.informatik.uni-erlangen.de>
Hello, this is better (it strips the colon from the first mode):
sub
process_git_diff_output
{
my $str = shift || die("Need Input"); my @in = split("\0", $str);
my @out = (); while (@in) {
my @tmp = split(' ', shift(@in));
$tmp[0] =~ s/^://g;
push(@tmp, shift(@in), shift(@in));
push(@out, [@tmp]);
}return(@out); }
Thomas