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

Re: [PATCH 1/2] notes get-ref: --expand expands the output notes ref.

From
W. Trevor King <wking@tremily.us>
Date
Sep 6, 2012, 06:11 UTC
Message-ID
<20120906061147.GA11770@odin.tremily.us>
In-Reply-To
<7v4nnb67x1.fsf@alter.siamese.dyndns.org>
On Wed, Sep 05, 2012 at 10:23:54PM -0700, Junio C Hamano wrote:
> Really?  Would "git log --expand master" be useful?
I'm clearly not an expert on this, but isn't that what
  git show-ref master

is for? Or is the fact that show-ref returns hashes the more important feature?

There was a lot of "ambiguous refs" discussion in the follow-up for
  http://thread.gmane.org/gmane.comp.version-control.git/165885
  Subject: [1.8.0] Provide proper remote ref namespaces
For example:
On Mon, Feb 07, 2011 at 03:25:51PM -0500, Jeff King wrote:
Show 6 quoted lines
> Will the same apply to refs/heads/foo versus refs/remotes/*/foo? Will it
> also apply to refs/heads/foo versus refs/remotes/*/tags/foo? In the
> final case, that does matter to "git push" (should the destination be in
> the head or tag namespace?). So the actual names of the ref can matter,
> and should probably be taken into account when deciding what is
> ambiguous.

So it seems like having a way to figure out how Git is interpreting a shorthand ref would be useful, especially while those of us with less experience are learning to think like Git.

The expansion command doesn't have to be notes-specific, but since the current ref expansion is role specific (e.g. branch/tag/note/…), it seemed like the best place to put it. With more consistent ref interpretation, I'd be less interested in this expansion command ;).

Trevor
-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 11 in “Add --expand to 'git notes get-ref'”
  1. 0/2 Add --expand to 'git notes get-ref'W. Trevor King, Sep 5, 2012
  2. 1/2 notes get-ref: --expand expands the output notes ref.W. Trevor King, Sep 5, 2012
  3. Johan HerlandSep 5, 2012
  4. Junio C HamanoSep 6, 2012
  5. W. Trevor KingSep 6, 2012
  6. Junio C HamanoSep 6, 2012
  7. Johan HerlandSep 10, 2012
  8. 2/2 notes: don't alter refs starting with 'refs/' in expand_notes_refW. Trevor King, Sep 5, 2012
  9. Johan HerlandSep 5, 2012
  10. W. Trevor KingSep 5, 2012
  11. Johan HerlandSep 5, 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.