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

Re: [PATCH] git-revover-tags-script

From
Junio C Hamano <junkio@cox.net>
Date
Jul 18, 2005, 06:36 UTC
Message-ID
<7vr7dw8vtr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<m164v8oenn.fsf@ebiederm.dsl.xmission.com>
ebiederm@xmission.com (Eric W. Biederman) writes:
> The big question is in what format should we return the heads?
> Just a space separated list of sha1's or a directory hierarchy
> like git-clone-pack uses.
My knee-jerk reaction is something like this:
    $ git-list-remote jg-libata
    9956d54ace3c64512d0c5498e0137180741e5d04	heads/adma
    433e7832818faf93c0f366fea3e14773cdcf3811	heads/adma-mwi
    ...
    80ebd62e0cca50869da2d5159fa4d6b723f0c014	heads/sil24
    9e734775f7c22d2f89943ad6c745571f1930105f	tags/v2.6.12-rc2
    26791a8bcf0e6d33f43aef7682bdb555236d56de	tags/v2.6.12
    ...
    a339981ec18d304f9efeb9ccf01b1f04302edf32	tags/v2.6.13-rc3

That is, SHA1 and path relative to .git/refs separated with a TAB, and terminated with LF.

I do not care too much about the protocol level, but since we are not talking about hundreds of heads and tags, probably the simplest would be to match the same, or use SP instead of TAB there to match upload-pack protocol.

I think the bigger question is how to help the user manage and store this information in his .git/refs/tags hierarchy.

The mechanism to store the URL and head in branches/<name>, and copy the head value in the corresponding refs/heads/<name> was borrowed from Cogito, and I think it covers the refs/heads side quite well. The user gives a name to the branch of a foreign repository he is interested in, the fetched head from there is stored in the same <name>, so the namespace under refs/heads and branches are totally under the user's control.

If somebody cares about automated fetching of all the tags from a remote repository, probably the easiest way would be to create a subdirectory that corresponds to the short-hand name and use that directory to store all tags slurped from there. But I am not convinced myself this is that much useful.

Previous: Eric W. BiedermanNext: Eric W. Biederman
Message 8 of 12 in “git-revover-tags-script”
  1. git-revover-tags-scriptEric W. Biederman, Jul 16, 2005
  2. Junio C HamanoJul 17, 2005
  3. Eric W. BiedermanJul 17, 2005
  4. Junio C HamanoJul 17, 2005
  5. Eric W. BiedermanJul 18, 2005
  6. Junio C HamanoJul 18, 2005
  7. Eric W. BiedermanJul 18, 2005
  8. Junio C HamanoJul 18, 2005
  9. Eric W. BiedermanJul 18, 2005
  10. [RFD] server-info to help clientsJunio C Hamano, Jul 20, 2005
  11. David LangJul 20, 2005
  12. Junio C HamanoJul 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.