git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Dmitry Kakurin <dmitry.kakurin@gmail.com>,
	git@vger.kernel.org
Subject: Re: fast-import and core.autocrlf option
Date: Mon, 23 Jul 2007 00:01:33 -0400	[thread overview]
Message-ID: <20070723040133.GD32566@spearce.org> (raw)
In-Reply-To: <7vwswrojzq.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> > 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.
> 
> Don't the front-ends usually have path information already when
> they feed you a blob data, especially most of them operate on
> per-file history?  If that is the case,...

Depends.  A frontend can feed huge streams of blobs and use marks
to make us remember their SHA-1s, then later feed us those marks
and connect them to paths.  Such a frontend may not have exact path
information available when it feeds the blobs to us.  Then again
maybe it does.  Depends on how the source information was organized.

> > 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.
> 
> ... the "option" could be "this came from such and such path"
> instead of "this is DOS data, please apply crlf".

How do we setup .gitattributes?  Should it be read from a branch
in memory, or the working directory?

If it should be read from a branch, which branch?  What if the
frontend does not want the .gitattributes file in the history
of the import?  Putting it into a branch just to cause CRLF->LF
translation during import would require filter-branch afterwards
to strip out the file.

I'd rather make things very explicit.  If the frontend wants us to
apply a filter to a data chunk before we work further on it then
the frontend should give us the .gitattributes rules to apply as
part of the data command.

-- 
Shawn.

      reply	other threads:[~2007-07-23  4:01 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
2007-07-23  3:51     ` Junio C Hamano
2007-07-23  4:01       ` Shawn O. Pearce [this message]

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=20070723040133.GD32566@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dmitry.kakurin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).