{"thread":{"id":"20086","subject":"Show current SHA1","startedAt":"2009-07-11T09:39:44Z","lastAt":"2009-07-11T11:36:52Z","messageCount":4,"participants":["Allan Kelly","Teemu Likonen","Charles Bailey","Heinrich Nirschl"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117820","messageId":"9586f3420907110239nbc35aealb473e1f1b3667410@mail.gmail.com","threadId":"20086","inReplyTo":null,"subject":"Show current SHA1","fromName":"Allan Kelly","fromEmail":"allankelly@gmail.com","sentAt":"2009-07-11T09:39:44Z","receivedAt":"2009-07-11T09:39:44Z","isPatch":false,"sender":{"key":"allankelly@gmail.com","avatar":"https://gravatar.com/avatar/c62021c01204c1e0c91084a96d4c16f19d394d3e67f6f51c707686da1d59cb64?d=mp&s=160"},"body":"Hi, hopefully a very simple newb question: \"what is the command to\nreport the current SHA1?\" - explanation below.\n\nI'm vc-ing my MSc thesis and associated code with git, it's working\ngreat for me. My supervisor requires regular submissions as editable\nWord docs so I publish my source HTML to him as RTF. He adds comments\nvia Word & returns to me, I read in Open Office 3. This works, but\nthere is often a week or more between him receiving the doc and\nreturning it to me with comments.\n\nI'd like to put the current SHA1 as text in the RTF so that I can\ngenerate a diff from my current version before responding to his\ncomments.\n\nThe question then is: what is the command to report the current SHA1?\nNote I never branch in the HTML repo, it's entirely linear.\n\nMany thanks, al.\n"},{"id":"117822","messageId":"874otjlf22.fsf@iki.fi","threadId":"20086","inReplyTo":"9586f3420907110239nbc35aealb473e1f1b3667410@mail.gmail.com","subject":"Re: Show current SHA1","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2009-07-11T09:55:17Z","receivedAt":"2009-07-11T09:55:17Z","isPatch":false,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"On 2009-07-11 10:39 (+0100), Allan Kelly wrote:\n\n> The question then is: what is the command to report the current SHA1?\n> Note I never branch in the HTML repo, it's entirely linear.\n\nIf the \"current SHA1\" means \"the SHA1 of the most recent commit in the\ncurrent branch\" then usually\n\n    git show\n\nis the simplest way. There are many ways to print _only_ the SHA1.\nExamples:\n\n    git log -1 --pretty=format:%H\n    git rev-list -1 HEAD\n"},{"id":"117823","messageId":"20090711101652.GA30698@hashpling.org","threadId":"20086","inReplyTo":"874otjlf22.fsf@iki.fi","subject":"Re: Show current SHA1","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2009-07-11T10:16:52Z","receivedAt":"2009-07-11T10:16:52Z","isPatch":false,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Sat, Jul 11, 2009 at 12:55:17PM +0300, Teemu Likonen wrote:\n> On 2009-07-11 10:39 (+0100), Allan Kelly wrote:\n> \n> > The question then is: what is the command to report the current SHA1?\n> > Note I never branch in the HTML repo, it's entirely linear.\n> \n> If the \"current SHA1\" means \"the SHA1 of the most recent commit in the\n> current branch\" then usually\n> \n>     git show\n> \n> is the simplest way. There are many ways to print _only_ the SHA1.\n> Examples:\n> \n>     git log -1 --pretty=format:%H\n>     git rev-list -1 HEAD\n\nFor listing a single commit, I usually think of show and rev-parse\nbefore using commands that list multiple commits. (Of course, having\nto use --quiet doesn't make show any shorter than log -1.)\n\n    git rev-parse HEAD\n    git show --quiet --pretty=format:%H\n\n-- \nCharles Bailey\nhttp://ccgi.hashpling.plus.com/blog/\n"},{"id":"117825","messageId":"394ab6ec0907110436o42062d7dn362194978bc098f9@mail.gmail.com","threadId":"20086","inReplyTo":"9586f3420907110239nbc35aealb473e1f1b3667410@mail.gmail.com","subject":"Re: Show current SHA1","fromName":"Heinrich Nirschl","fromEmail":"heinrich.nirschl@gmail.com","sentAt":"2009-07-11T11:36:52Z","receivedAt":"2009-07-11T11:36:52Z","isPatch":false,"sender":{"key":"heinrich.nirschl@gmail.com","avatar":null},"body":"On Sat, Jul 11, 2009 at 11:39 AM, Allan Kelly<allankelly@gmail.com> wrote:\n> I'd like to put the current SHA1 as text in the RTF so that I can\n> generate a diff from my current version before responding to his\n> comments.\n\nInstead of doing that, you can put a tag on the version you deliver.\n\n- Henry\n"}]}