{"thread":{"id":"23353","subject":"What happens in this example case?","startedAt":"2010-04-06T09:13:53Z","lastAt":"2010-04-06T16:25:55Z","messageCount":3,"participants":["Kārlis Repsons","Eric Raible"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138729","messageId":"201004060913.56760.k@11.lv","threadId":"23353","inReplyTo":null,"subject":"What happens in this example case?","fromName":"Kārlis Repsons","fromEmail":"k@11.lv","sentAt":"2010-04-06T09:13:53Z","receivedAt":"2010-04-06T09:13:53Z","isPatch":false,"sender":{"key":"k@11.lv","avatar":null},"body":"Hi,\nit would be good if someone explained how is git doing things internally when:\n\n1.\nmkdir dir; cd dir; git init; echo -e \"A\\na\\nA\" > file; git add .; git commit -a -m comm1\n\n2.\necho -e \"A\\nb\\nA\" > file; git commit -a -m comm2;\n\n\nI want to understand how those three letters are stored in each of the\ntwo cases and how can the contents of file be recovered from .git\narchive, say, after git reset --hard <commit-hash>?\n\n(is git storing just the position of change for 'b' and 'b' in the second\ncase? why is $(git cat-file -p) showing all three letters for the respective\nobjects in both cases?)\n"},{"id":"138759","messageId":"loom.20100406T173712-277@post.gmane.org","threadId":"23353","inReplyTo":"201004060913.56760.k@11.lv","subject":"Re: What happens in this example case?","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2010-04-06T15:42:05Z","receivedAt":"2010-04-06T15:42:05Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"Kārlis Repsons <k <at> 11.lv> writes:\n\n> \n> Hi,\n> it would be good if someone explained how is git doing things internally when:\n\nHi,\nit would be good if someone did basic research before asking such questions.\n\nStart with http://book.git-scm.com.\n"},{"id":"138763","messageId":"201004061625.58742.k@11.lv","threadId":"23353","inReplyTo":"loom.20100406T173712-277@post.gmane.org","subject":"Re: What happens in this example case?","fromName":"Kārlis Repsons","fromEmail":"k@11.lv","sentAt":"2010-04-06T16:25:55Z","receivedAt":"2010-04-06T16:25:55Z","isPatch":false,"sender":{"key":"k@11.lv","avatar":null},"body":"On Tuesday 06 April 2010 15:42:05 Eric Raible wrote:\n> Hi,\n> it would be good if someone did basic research before asking such\n>  questions.\n> \n> Start with http://book.git-scm.com.\nThanks, silly enough I didn't see that link in the documentation page, where \n\"Git Community Book : The git-scm.com community-built comprehensive online \nbook\" was just a headline of some kind to me...\n\nSo, as I now understand it: git stores all unique contents of a file into a \nblob; there is no need to descend into the previous commits to get the actual \ncontents of a file (as I was admitting, it could happen with help of diffs).\n"}]}