{"thread":{"id":"19803","subject":"Repository authenticity question","startedAt":"2009-06-13T15:26:58Z","lastAt":"2009-06-17T08:07:56Z","messageCount":4,"participants":["Kārlis Repsons","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116234","messageId":"200906131527.03450.Karlis.Repsons@gmail.com","threadId":"19803","inReplyTo":null,"subject":"Repository authenticity question","fromName":"Kārlis Repsons","fromEmail":"karlis.repsons@gmail.com","sentAt":"2009-06-13T15:26:58Z","receivedAt":"2009-06-13T15:26:58Z","isPatch":false,"sender":{"key":"karlis.repsons@gmail.com","avatar":null},"body":"Hi,\nIt would be good to know what did Linus meant, when he said \"and they will \nfail\" about people, who would try changing some git projects' history (that \nis, the content, that is added already)? If I loose my repository completely, \ncan I still know, that those contributions there are the same after I pull \nand how? What contents can be deleted, while still retaining consistency?\n\nRegards,\nKārlis\n"},{"id":"116236","messageId":"4A33C980.40003@drmicha.warpmail.net","threadId":"19803","inReplyTo":"200906131527.03450.Karlis.Repsons@gmail.com","subject":"Re: Repository authenticity question","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-06-13T15:45:04Z","receivedAt":"2009-06-13T15:45:04Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Kārlis Repsons venit, vidit, dixit 13.06.2009 17:26:\n> Hi,\n> It would be good to know what did Linus meant, when he said \"and they will \n> fail\" about people, who would try changing some git projects' history (that \n> is, the content, that is added already)? If I loose my repository completely, \n> can I still know, that those contributions there are the same after I pull \n> and how? What contents can be deleted, while still retaining consistency?\n> \n> Regards,\n> Kārlis\n\nThe sha1 (\"object name\") of a commit depends not only on its contents,\nbut on all its predecessors. So if you know one commit's sha1 to be\n\"original\" you know for all its ancestors.\n\nMichael\n"},{"id":"116456","messageId":"200906170757.59476.Karlis.Repsons@gmail.com","threadId":"19803","inReplyTo":"4A33C980.40003@drmicha.warpmail.net","subject":"Re: Repository authenticity question","fromName":"Kārlis Repsons","fromEmail":"karlis.repsons@gmail.com","sentAt":"2009-06-17T07:57:51Z","receivedAt":"2009-06-17T07:57:51Z","isPatch":false,"sender":{"key":"karlis.repsons@gmail.com","avatar":null},"body":"On Saturday 13 June 2009 15:45:04 you wrote:\n> Kārlis Repsons venit, vidit, dixit 13.06.2009 17:26:\n> > Hi,\n> > It would be good to know what did Linus meant, when he said \"and they\n> > will fail\" about people, who would try changing some git projects'\n> > history (that is, the content, that is added already)? If I loose my\n> > repository completely, can I still know, that those contributions there\n> > are the same after I pull and how? What contents can be deleted, while\n> > still retaining consistency?\n> >\n> > Regards,\n> > Kārlis\n>\n> The sha1 (\"object name\") of a commit depends not only on its contents,\n> but on all its predecessors. So if you know one commit's sha1 to be\n> \"original\" you know for all its ancestors.\n>\n> Michael\n\nSo, if I clone someone else's git archive, sha1 of a known commit must be \ncompared and what else? How to check if all of archive's sha1-s are identical \nto its contents and every content is included?\n"},{"id":"116458","messageId":"4A38A45C.6080708@drmicha.warpmail.net","threadId":"19803","inReplyTo":"200906170757.59476.Karlis.Repsons@gmail.com","subject":"Re: Repository authenticity question","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-06-17T08:07:56Z","receivedAt":"2009-06-17T08:07:56Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Kārlis Repsons venit, vidit, dixit 17.06.2009 09:57:\n> On Saturday 13 June 2009 15:45:04 you wrote:\n>> Kārlis Repsons venit, vidit, dixit 13.06.2009 17:26:\n>>> Hi,\n>>> It would be good to know what did Linus meant, when he said \"and they\n>>> will fail\" about people, who would try changing some git projects'\n>>> history (that is, the content, that is added already)? If I loose my\n>>> repository completely, can I still know, that those contributions there\n>>> are the same after I pull and how? What contents can be deleted, while\n>>> still retaining consistency?\n>>>\n>>> Regards,\n>>> Kārlis\n>>\n>> The sha1 (\"object name\") of a commit depends not only on its contents,\n>> but on all its predecessors. So if you know one commit's sha1 to be\n>> \"original\" you know for all its ancestors.\n>>\n>> Michael\n> \n> So, if I clone someone else's git archive, sha1 of a known commit must be \n> compared and what else? How to check if all of archive's sha1-s are identical \n> to its contents and every content is included?\n\nAs I said: if the sha1 of one commit agrees with what what you have or\nknow then, automatically, all ancestry is \"original\": commits as well as\ncontents.\n\nYou can check the repo itself using \"git fsck\", this makes sure that all\nreferenced content is included.\n\nMichael\n"}]}