Re: git-svn does not seems to work with crlf convertion enabled.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Potapov
Date: Wednesday, August 6, 2008 - 9:11 am

On Wed, Aug 6, 2008 at 3:15 PM, Petr Baudis <pasky@suse.cz> wrote:

Actually, it is not so simple. If you have svn properties setup correctly
for your text files (i.e. svn:eol-style=native) than autocrlf=false is
not what you want, because then SVN uses LF as EOL when stores this files.

In many case, just setting svn:eol-style correctly in SVN may solve the
problem.

However, to make git-svn work reliable in present files with different
ending, it should import files from SVN  without applying any filter.
Therefore, the --no-filters option was recently added to git-hash-object.
Adding its use to git-svn should be easy (I have not had time to test it):
===
diff --git a/perl/Git.pm b/perl/Git.pm
index 087d3d0..438b7fd 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -829,7 +829,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 {
===

This should solve all problem with git-svn fetch. However, if you want to
respect svn:eol-style and when you commit your changes, that will require
synchronization svn:eol-style with values for crlf in your .gitattributes,
which is a much more ambitious task.

Dmitry
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-svn does not seems to work with crlf convertion enabled., Alexander Litvinov, (Wed Jul 23, 1:44 am)
Re: git-svn does not seems to work with crlf convertion en ..., Johannes Schindelin, (Wed Jul 23, 2:18 am)
Re: git-svn does not seems to work with crlf convertion en ..., Alexander Litvinov, (Wed Jul 23, 4:52 am)
Re: git-svn does not seems to work with crlf convertion en ..., Johannes Schindelin, (Wed Jul 23, 5:57 am)
Re: git-svn does not seems to work with crlf convertion en ..., Johannes Schindelin, (Wed Jul 23, 9:07 am)
Re: git-svn does not seems to work with crlf convertion en ..., Alexander Litvinov, (Wed Jul 23, 8:13 pm)
Re: git-svn does not seems to work with crlf convertion en ..., Johannes Schindelin, (Thu Jul 24, 7:40 am)
Re: git-svn does not seems to work with crlf convertion en ..., Alexander Litvinov, (Tue Jul 29, 9:37 pm)
[PATCH] git-svn now work with crlf convertion enabled., Alexander Litvinov, (Wed Jul 30, 10:43 pm)
Re: [PATCH] git-svn now work with crlf convertion enabled., Alexander Litvinov, (Wed Jul 30, 10:57 pm)
Re: [PATCH] git-svn now work with crlf convertion enabled., Dmitry Potapov, (Thu Jul 31, 3:45 am)
[RFC] hash-object --no-filters, Dmitry Potapov, (Thu Jul 31, 12:09 pm)
Re: [PATCH] git-svn now work with crlf convertion enabled., Alexander Litvinov, (Thu Jul 31, 8:23 pm)
Re: [PATCH] git-svn now work with crlf convertion enabled., Junio C Hamano, (Thu Jul 31, 10:09 pm)
Re: [PATCH] git-svn now work with crlf convertion enabled., Dmitry Potapov, (Fri Aug 1, 12:44 am)
Re: [PATCH] git-svn now work with crlf convertion enabled., Dmitry Potapov, (Fri Aug 1, 12:47 am)
Re: [PATCH] git-svn now work with crlf convertion enabled., Alexander Litvinov, (Fri Aug 1, 4:11 am)
Re: [PATCH] git-svn now work with crlf convertion enabled., Alexander Litvinov, (Fri Aug 1, 4:27 am)
Re: [PATCH] git-svn now work with crlf convertion enabled., Alexander Litvinov, (Sun Aug 3, 8:10 pm)
Re: git-svn does not seems to work with crlf convertion en ..., Johannes Schindelin, (Wed Aug 6, 5:43 am)
Re: git-svn does not seems to work with crlf convertion en ..., Dmitry Potapov, (Wed Aug 6, 9:11 am)