git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* smudge/clean filters and SHA1 hashes
@ 2014-05-02 21:05 Leo Razoumov
  2014-05-02 21:07 ` Shawn Pearce
  2014-05-02 22:02 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Leo Razoumov @ 2014-05-02 21:05 UTC (permalink / raw)
  To: Git Mailing List

Hi All,

surprisingly, searching this list and by way of Google
I cannot find an answer to a simple question:

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

Thanks,
--Leo--

P.S. Very similar question [1] was posted here in 2012 but went unanswered.

[1] http://git.661346.n2.nabble.com/workflow-clarification-sha1-merge-patch-diff-ws-smudge-clean-td7561818.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: smudge/clean filters and SHA1 hashes
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Pearce @ 2014-05-02 21:07 UTC (permalink / raw)
  To: SLONIK.AZ; +Cc: Git Mailing List

On Fri, May 2, 2014 at 2:05 PM, Leo Razoumov <slonik.az@gmail.com> wrote:
> surprisingly, searching this list and by way of Google
> I cannot find an answer to a simple question:
>
> In presence of smudge/clean filters which SHA1 hash
> (clean content or smudged content) gets stored in the repository?

The clean version is used to obtain the SHA-1.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: smudge/clean filters and SHA1 hashes
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2014-05-02 22:02 UTC (permalink / raw)
  To: SLONIK.AZ; +Cc: Git Mailing List

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-02 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).