From: Erik Faye-Lund Date: Wed, 3 Mar 2010 20:10:22 +0000 (+0100) Subject: git-svn: support fetch with autocrlf on X-Git-Tag: v1.7.1-rc0~98 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=402e139c7e30eb95312aeafdc1a9e8e8167c14cb;p=git.git git-svn: support fetch with autocrlf on Before commit d3c9634e, performing a "git svn rebase" that fetched a change containing CRLFs corrupted the git-svn meta-data. This was worked around in d3c9634e by setting core.autocrlf to "false" in the per-repo config when initing the clone. However, if the config variable was later changed, the corruption would still occur. This patch tries to fix it while allowing core.autocrlf to be enabled, by disabling filters when when hashing. git-svn is currently the only call-site for hash_and_insert_object (apart from the test-suite), so changing it should be safe. Signed-off-by: Erik Faye-Lund Acked-by: Eric Wong --- diff --git a/perl/Git.pm b/perl/Git.pm index 970fe434e..1926dc9a4 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -842,7 +842,7 @@ sub _open_hash_and_insert_object_if_needed { ($self->{hash_object_pid}, $self->{hash_object_in}, $self->{hash_object_out}, $self->{hash_object_ctx}) = - command_bidi_pipe(qw(hash-object -w --stdin-paths)); + command_bidi_pipe(qw(hash-object -w --stdin-paths --no-filters)); } sub _close_hash_and_insert_object {