{"thread":{"id":"36568","subject":"smudge/clean filters and SHA1 hashes","startedAt":"2014-05-02T21:05:57Z","lastAt":"2014-05-02T22:02:10Z","messageCount":3,"participants":["Leo Razoumov","Shawn Pearce","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"240571","messageId":"CADsUFkQLtUDpoiSqj-UYeyz1a-WZPh9vN+RW4ti8ut=22QwL4g@mail.gmail.com","threadId":"36568","inReplyTo":null,"subject":"smudge/clean filters and SHA1 hashes","fromName":"Leo Razoumov","fromEmail":"slonik.az@gmail.com","sentAt":"2014-05-02T21:05:57Z","receivedAt":"2014-05-02T21:05:57Z","isPatch":false,"sender":{"key":"slonik.az@gmail.com","avatar":null},"body":"Hi All,\n\nsurprisingly, searching this list and by way of Google\nI cannot find an answer to a simple question:\n\nIn presence of smudge/clean filters which SHA1 hash\n(clean content or smudged content) gets stored in the repository?\n\nThanks,\n--Leo--\n\nP.S. Very similar question [1] was posted here in 2012 but went unanswered.\n\n[1] http://git.661346.n2.nabble.com/workflow-clarification-sha1-merge-patch-diff-ws-smudge-clean-td7561818.html\n"},{"id":"240572","messageId":"CAJo=hJurLa9rdHNHS01uW3FEd_yNPzdFE8X4xaOWCFCnzF7MUg@mail.gmail.com","threadId":"36568","inReplyTo":"CADsUFkQLtUDpoiSqj-UYeyz1a-WZPh9vN+RW4ti8ut=22QwL4g@mail.gmail.com","subject":"Re: smudge/clean filters and SHA1 hashes","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2014-05-02T21:07:02Z","receivedAt":"2014-05-02T21:07:02Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Fri, May 2, 2014 at 2:05 PM, Leo Razoumov <slonik.az@gmail.com> wrote:\n> surprisingly, searching this list and by way of Google\n> I cannot find an answer to a simple question:\n>\n> In presence of smudge/clean filters which SHA1 hash\n> (clean content or smudged content) gets stored in the repository?\n\nThe clean version is used to obtain the SHA-1.\n"},{"id":"240579","messageId":"xmqqeh0balgd.fsf@gitster.dls.corp.google.com","threadId":"36568","inReplyTo":"CADsUFkQLtUDpoiSqj-UYeyz1a-WZPh9vN+RW4ti8ut=22QwL4g@mail.gmail.com","subject":"Re: smudge/clean filters and SHA1 hashes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-02T22:02:10Z","receivedAt":"2014-05-02T22:02:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Leo Razoumov <slonik.az@gmail.com> writes:\n\n> In presence of smudge/clean filters which SHA1 hash\n> (clean content or smudged content) gets stored in the repository?\n\nYou are cleaning cruft in the contents before the contents are\nhashed to compute the object name.  The point is to keep clean\nobjects in the object database, protected from dirty reality in the\nworking tree (which you instanciate by applying the smudge filter to\ndirty the clean object in the ideal world).\n\nThe crlf conversion works exactly the same way. For portability, you\nkeep a version terminated with LF in the object database and that is\nwhat is hashed to compute the blob object name, but we export with\nCRLF line endings for a working tree that wants files whose lines\nare terminated that way.\n"}]}