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

Re: Questions about git-rev-parse

From
Junio C Hamano <junkio@cox.net>
Date
Feb 28, 2007, 02:40 UTC
Message-ID
<7vvehn2eds.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<E1HMETh-0004BO-Lw@candygram.thunk.org>
"Theodore Ts'o" <tytso@mit.edu> writes:
Show 5 quoted lines
> So I'm wondering if I'm missing something about historical context,
> since from looking at git-rev-parse, it looks like not a lot of thought
> went into its design, and it has a bunch of stuff that grew via
> accretion; or maybe I'm not understanding why it was designed the way it
> was?

You are lacking historical context that our porcelain-ish were all Bourne shell scripts. If you check out an old version (say v0.99), it would be apparent why translating symbolic names to object names and canonicalizing a..b to b ^a were useful to help them.

These days, "log" family got sufficiently smart that there are not many reasons to write shell pipeline that has rev-list on the upstream with diff-tree --stdin on the downstream anymore, and rev-parse outlived its original purpose of sifting between rev-list args/flags and others.

Previous: Theodore Ts'oNext: Theodore Tso
Message 2 of 9 in “Questions about git-rev-parse”
  1. Theodore Ts'oFeb 28, 2007
  2. Junio C HamanoFeb 28, 2007
  3. Theodore TsoFeb 28, 2007
  4. Linus TorvaldsFeb 28, 2007
  5. Theodore TsoFeb 28, 2007
  6. Andy ParkinsFeb 28, 2007
  7. Linus TorvaldsFeb 28, 2007
  8. Linus TorvaldsFeb 28, 2007
  9. Willhelm BuschMar 1, 2007

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.