git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: SLONIK.AZ@gmail.com
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: smudge/clean filters and SHA1 hashes
Date: Fri, 02 May 2014 15:02:10 -0700	[thread overview]
Message-ID: <xmqqeh0balgd.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CADsUFkQLtUDpoiSqj-UYeyz1a-WZPh9vN+RW4ti8ut=22QwL4g@mail.gmail.com> (Leo Razoumov's message of "Fri, 2 May 2014 17:05:57 -0400")

Leo Razoumov <slonik.az@gmail.com> writes:

> In presence of smudge/clean filters which SHA1 hash
> (clean content or smudged content) gets stored in the repository?

You are cleaning cruft in the contents before the contents are
hashed to compute the object name.  The point is to keep clean
objects in the object database, protected from dirty reality in the
working tree (which you instanciate by applying the smudge filter to
dirty the clean object in the ideal world).

The crlf conversion works exactly the same way. For portability, you
keep a version terminated with LF in the object database and that is
what is hashed to compute the blob object name, but we export with
CRLF line endings for a working tree that wants files whose lines
are terminated that way.

      parent reply	other threads:[~2014-05-02 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 21:05 smudge/clean filters and SHA1 hashes Leo Razoumov
2014-05-02 21:07 ` Shawn Pearce
2014-05-02 22:02 ` Junio C Hamano [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=xmqqeh0balgd.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=SLONIK.AZ@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).