git/list[1] front-page[2] threads[3] people[4] search[5] about
 

What's the point of saying "HEAD is now at ..."?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 14, 2012, 05:14 UTC
Message-ID
<7vvcfh6v9m.fsf@alter.siamese.dyndns.org>
I sometimes wonder what value the message is giving us.
For example, while reviewing a patch in my Emacs session, I may say
    | git am -s3c <RETURN>

which runs the command on the contents of the e-mail I am reading, to apply the patch. After that, I would go to a separate terminal and do things like "git show -U20", etc. Once I am done, I reset the temporary commit away, and get this:

    $ git reset --hard HEAD^
    HEAD is now at ce5cf6f Merge git://github.com/git-l10n/git-po
or often it is
    $ git reset --hard ko/master
    HEAD is now at ce5cf6f Merge git://github.com/git-l10n/git-po

In either case, I know where I am resetting to, so "HEAD is now at" is a less than useful noise. If it contained "HEAD was at ...", it may let me realize that I was still going to use the contents in some other way and quickly go back to it with another reset, with cut and paste or with HEAD@{1}. In either case, showing the tip of what I just discarded seems to be a lot more useful information than what we are currently giving the users.

Next: Michael J Gruber
Message 1 of 2 in “What's the point of saying "HEAD is now at ..."?”
  1. Junio C HamanoSep 14, 2012
  2. Michael J GruberSep 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.