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

Re: [PATCH] cg-fetch will now retrieve commits related to tags if missing.

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Oct 20, 2005, 04:15 UTC
Message-ID
<46a038f90510192115x21ed7e96l6d85ce233e66a5f2@mail.gmail.com>
In-Reply-To
<7voe5lvv1q.fsf@assigned-by-dhcp.cox.net>
On 10/20/05, Junio C Hamano <junkio@cox.net> wrote:
> You just reported this $tag needs quoting ;-).

I thought I had seen a post from you to Petr, mentioning that he had just fixed it. I didn't see any fix when I updated, but I thought it may have been due to mirroring issues. In any case, it obviously needs quoting.

Show 14 quoted lines
> > +             GIT_DIR=../.. [ "`git-cat-file -t $tagid 2>/dev/null`" = "commit" ] && continue
> > +             GIT_DIR=../.. git-cat-file commit `git-rev-parse $tag^{commit}  2>/dev/null` 2>&1 >> /dev/null && continue
>
> You are saying:
>         if "$tagid" is already commit then continue;
>         if "$tagid" dereferences to a commit and if you have it
>         then continue
>
> If that is the case, then this might be more efficient.
>
>         GIT_DIR=../.. git-rev-parse --verify "$tagid^0" >/dev/null 2>&1 && continue
>
> You can say ^{commit} instead of ^0 if you like that newer
> style, of course.

I tried, and failed to get it to work 100% so I reverted to the double check you've seen. Must have been PEBKAC for now it works correctly -- possibly related to the unquoted tagnames.

Ok -- too many problems with that patch. Let's try it again...
martin
Previous: Junio C HamanoNext: Martin Langhoff
Message 3 of 7 in “cg-fetch will now retrieve commits related to tags if missing.”
  1. cg-fetch will now retrieve commits related to tags if missing.Martin Langhoff, Oct 20, 2005
  2. Junio C HamanoOct 20, 2005
  3. Martin LanghoffOct 20, 2005
  4. Martin LanghoffOct 20, 2005
  5. Junio C HamanoOct 20, 2005
  6. Martin LanghoffOct 20, 2005
  7. Junio C HamanoOct 20, 2005

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.