{"thread":{"id":"31530","subject":"What's the point of saying \"HEAD is now at ...\"?","startedAt":"2012-09-14T05:14:29Z","lastAt":"2012-09-14T10:48:49Z","messageCount":2,"participants":["Junio C Hamano","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198997","messageId":"7vvcfh6v9m.fsf@alter.siamese.dyndns.org","threadId":"31530","inReplyTo":null,"subject":"What's the point of saying \"HEAD is now at ...\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-14T05:14:29Z","receivedAt":"2012-09-14T05:14:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I sometimes wonder what value the message is giving us.\n\nFor example, while reviewing a patch in my Emacs session, I may say\n\n    | git am -s3c <RETURN>\n\nwhich runs the command on the contents of the e-mail I am reading,\nto apply the patch.  After that, I would go to a separate terminal\nand do things like \"git show -U20\", etc.  Once I am done, I reset\nthe temporary commit away, and get this:\n\n    $ git reset --hard HEAD^\n    HEAD is now at ce5cf6f Merge git://github.com/git-l10n/git-po\n\nor often it is\n\n    $ git reset --hard ko/master\n    HEAD is now at ce5cf6f Merge git://github.com/git-l10n/git-po\n\nIn either case, I know where I am resetting to, so \"HEAD is now at\"\nis a less than useful noise.  If it contained \"HEAD was at ...\", it\nmay let me realize that I was still going to use the contents in\nsome other way and quickly go back to it with another reset, with\ncut and paste or with HEAD@{1}.  In either case, showing the tip of\nwhat I just discarded seems to be a lot more useful information than\nwhat we are currently giving the users.\n"},{"id":"199022","messageId":"50530B91.1030808@drmicha.warpmail.net","threadId":"31530","inReplyTo":"7vvcfh6v9m.fsf@alter.siamese.dyndns.org","subject":"Re: What's the point of saying \"HEAD is now at ...\"?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-09-14T10:48:49Z","receivedAt":"2012-09-14T10:48:49Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 14.09.2012 07:14:\n> I sometimes wonder what value the message is giving us.\n> \n> For example, while reviewing a patch in my Emacs session, I may say\n> \n>     | git am -s3c <RETURN>\n> \n> which runs the command on the contents of the e-mail I am reading,\n> to apply the patch.  After that, I would go to a separate terminal\n> and do things like \"git show -U20\", etc.  Once I am done, I reset\n> the temporary commit away, and get this:\n> \n>     $ git reset --hard HEAD^\n>     HEAD is now at ce5cf6f Merge git://github.com/git-l10n/git-po\n> \n> or often it is\n> \n>     $ git reset --hard ko/master\n>     HEAD is now at ce5cf6f Merge git://github.com/git-l10n/git-po\n> \n> In either case, I know where I am resetting to, so \"HEAD is now at\"\n> is a less than useful noise.  If it contained \"HEAD was at ...\", it\n> may let me realize that I was still going to use the contents in\n> some other way and quickly go back to it with another reset, with\n> cut and paste or with HEAD@{1}.  In either case, showing the tip of\n> what I just discarded seems to be a lot more useful information than\n> what we are currently giving the users.\n> \n\nUnless you use a git aware prompt, it's always good to know where your\nHEAD is ;) Just think of:\n\ngit reset --hard HEAD^2\nHEAD is now at ...\n\nOh, I meant HEAD~2 aka HEAD^^ ...\n\nIn that case, information about HEAD@{1} might be useful but is not\nnecessary, unless you are leaving behind a detached HEAD.\n\nCheers,\nMichael\n"}]}