From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Dmitry Kakurin <dmitry.kakurin@gmail.com>, git@vger.kernel.org
Subject: Re: fast-import and core.autocrlf option
Date: Sun, 22 Jul 2007 23:45:14 -0400 [thread overview]
Message-ID: <20070723034514.GZ32566@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0707230039560.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Sun, 22 Jul 2007, Dmitry Kakurin wrote:
>
> > It looks to me that CR/LF conversion does not happen during
> > fast-import even if I have core.autocrlf set to 'input'.
> > Is this a bug or is there a reason for that?
>
> fast-import works on blobs only. So it is expected. Besides, it would
> slow down fast-import tremendously if you wanted to introduce that
> behaviour. Therefore I suggest just rolling your own dos2unix instead of
> trying to play cute games with fast-import.
Right, in fast-import we only process blobs as raw blobs.
Its rare that we have a file path associated with the blob data
at the time that we are actually processing the blob itself. E.g.
applications can send us blobs up front, before they even start to
send us commits and path information.
So if we were to offer the CRLF->LF conversion feature in fast-import
it would need to be an option supplied at the time the 'data'
command issued, rather than based upon the gitattributes system
that is normally used for working tree operations.
It wouldn't be to difficult to add such an option to the data
command, but I'm not going to be able to get around to it anytime
soon. This might be an easy change for someone else to attempt if
they were interested in some Git hacking. Should all be isolated
to the cmd_data() routine in fast-import.c, and just needs to call
crlf_to_git() in convert.c, which is uh, static. :-)
--
Shawn.
next prev parent reply other threads:[~2007-07-23 3:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-22 22:59 fast-import and core.autocrlf option Dmitry Kakurin
2007-07-22 23:41 ` Johannes Schindelin
2007-07-23 3:45 ` Shawn O. Pearce [this message]
2007-07-23 3:51 ` Junio C Hamano
2007-07-23 4:01 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070723034514.GZ32566@spearce.org \
--to=spearce@spearce.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=dmitry.kakurin@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).