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

Re: [PATCH 2/6] add get_sha1_with_real_ref() returning full name of ref on demand

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 14, 2007, 17:21 UTC
Message-ID
<Pine.LNX.4.64.0710141819490.25221@racer.site>
In-Reply-To
<11923520852991-git-send-email-prohaska@zib.de>
Hi,
On Sun, 14 Oct 2007, Steffen Prohaska wrote:
Show 10 quoted lines
> Deep inside get_sha1() the name of the requested ref is matched
> according to the rules documented in git-rev-parse. This patch
> introduces a function that returns the full name of the matched
> ref to the outside.
> 
> For example 'master' is typically returned as 'refs/heads/master'.
> 
> The new function can be used by "git rev-parse" to print the full
> name of the matched ref and can be used by "git send-pack" to expand
> a local ref to its full name.

I have not really studies your patch, but from your description it sounds as if dwim_ref() does what you want.

Ciao, Dscho

Previous: Steffen ProhaskaNext: Steffen Prohaska
Message 9 of 12 in “change push's refspec behavior to match rev-parse”
  1. Steffen ProhaskaOct 14, 2007
  2. 1/6 push, send-pack: fix test if remote branch exists for colon-less refspecSteffen Prohaska, Oct 14, 2007
  3. 2/6 add get_sha1_with_real_ref() returning full name of ref on demandSteffen Prohaska, Oct 14, 2007
  4. 3/6 rev-parse: teach "git rev-parse --symbolic" to print the full ref nameSteffen Prohaska, Oct 14, 2007
  5. 4/6 push, send-pack: support pushing HEAD to real ref nameSteffen Prohaska, Oct 14, 2007
  6. 5/6 add ref_cmp_full_short() comparing full ref name with a short nameSteffen Prohaska, Oct 14, 2007
  7. 6/6 push, send-pack: use same rules as git-rev-parse to resolve refspecsSteffen Prohaska, Oct 14, 2007
  8. 4/6 push, send-pack: support pushing HEAD to real ref nameSteffen Prohaska, Oct 14, 2007
  9. Johannes SchindelinOct 14, 2007
  10. Steffen ProhaskaOct 14, 2007
  11. 1/6 push, send-pack: fix test if remote branch exists for colon-less refspecSteffen Prohaska, Oct 14, 2007
  12. Steffen ProhaskaOct 14, 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.