Skip to content

Commit

Permalink
git-svn: extract base blob in generate_diff
Browse files Browse the repository at this point in the history
We need the base blob to compute a delta to be sent to the server.

Signed-off-by: Florian Weimer <fw@deneb.enyo.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Florian Weimer authored and Eric Wong committed Sep 5, 2008
1 parent 80d12c2 commit 2d0c8ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -3380,11 +3380,12 @@ sub generate_diff {
while (<$diff_fh>) {
chomp $_; # this gets rid of the trailing "\0"
if ($state eq 'meta' && /^:(\d{6})\s(\d{6})\s
$::sha1\s($::sha1)\s
($::sha1)\s($::sha1)\s
([MTCRAD])\d*$/xo) {
push @mods, { mode_a => $1, mode_b => $2,
sha1_b => $3, chg => $4 };
if ($4 =~ /^(?:C|R)$/) {
sha1_a => $3, sha1_b => $4,
chg => $5 };
if ($5 =~ /^(?:C|R)$/) {
$state = 'file_a';
} else {
$state = 'file_b';
Expand Down

0 comments on commit 2d0c8ac

Please sign in to comment.