Re: [PATCH] git-svn now work with crlf convertion enabled.
- From
Dmitry Potapov <dpotapov@gmail.com>
- Date
- Aug 1, 2008, 09:24 UTC
- Message-ID
- <37fcd2780808010224l68c2c717y5334a34d9de1de8d@mail.gmail.com>
- In-Reply-To
- <7vbq0dtawp.fsf@gitster.siamese.dyndns.org>
On Fri, Aug 1, 2008 at 12:08 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> "Dmitry Potapov" <dpotapov@gmail.com> writes: >> >> To being able to synchronize efficiently in both ways, you need to store >> files exactly as they were received from SVN then there will be no >> problem with applying binary delta patch. All CRLF conversion should be >> done on checkout and checkin from/to Git repository. > > Ahh,... if that is the philosophy, perhaps we can teach --stdin-paths to > optionally open the file itself and use index_pipe() like --stdin codepath > does?
It is possible to do in this way, but it less efficient, because it uses index_pipe, which does not know the actual size, so it reallocates the buffer as it reads data from the descriptor, while index_fd uses xmap() instead. So I sent another solution yesterday: http://article.gmane.org/gmane.comp.version-control.git/90968
It is a bit hackish because I unset S_IFREG bit in st_mode to disable conversion. In fact, my question what would be a better way to tell index_fd to not do any conversion. If you think that it is better to use index_pipe, which does not any conversion than I will redo my patch to use it instead.
Dmitry