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

Updating shared ref from remote helper, or fetch hook

From
Jed Brown <jed@59a2.org>
Date
Jan 28, 2013, 05:19 UTC
Message-ID
<87ehh5lw9j.fsf@59A2.org>

I'm working on an hg remote helper that uses git notes for the sha1 revision, so that git users can more easily refer to specific commits when communicating with hg users. Since there may be multiple concurrent fast-import streams, I write the notes to a private ref (refs/notes/hg-REMOTE), to be merged eventually using

  git notes --ref hg merge hg-REMOTE*

There will never be conflicts because each hg commit translates to a unique git commit, thus even if multiple concurrent remotes process the same commit, the corresponding note will match.

Unfortunately, I couldn't find a safe way to get this run after a fetch or clone. Of course I can ask the user to arrange to have this command run, but it would be a better interface to have it run automatically since it is a natural responsibility of the remote helper. Am I missing a way to do this or a viable alternative approach?

Next: Max Horn
Message 1 of 3 in “Updating shared ref from remote helper, or fetch hook”
  1. Jed BrownJan 28, 2013
  2. Max HornJan 29, 2013
  3. Jed BrownJan 30, 2013

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.