Skip to content

Commit 402e139

Browse files
kusmaEric Wong
authored andcommitted
git-svn: support fetch with autocrlf on
Before commit d3c9634, performing a "git svn rebase" that fetched a change containing CRLFs corrupted the git-svn meta-data. This was worked around in d3c9634 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 <kusmabite@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
1 parent a9f9790 commit 402e139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl/Git.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ sub _open_hash_and_insert_object_if_needed {
842842

843843
($self->{hash_object_pid}, $self->{hash_object_in},
844844
$self->{hash_object_out}, $self->{hash_object_ctx}) =
845-
command_bidi_pipe(qw(hash-object -w --stdin-paths));
845+
command_bidi_pipe(qw(hash-object -w --stdin-paths --no-filters));
846846
}
847847

848848
sub _close_hash_and_insert_object {

0 commit comments

Comments
 (0)