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

Re: Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 16, 2012, 06:04 UTC
Message-ID
<7vk3vuzeot.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACffvTroMt-s7X_DV9AHerzKdgz+xABXTd91aTUc2BtYO7QxCA@mail.gmail.com>
David Chanters <david.chanters@googlemail.com> writes:
Show 5 quoted lines
> I've tried:
>
> [remote "origin"]
>         fetch =
> +refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/*

Read the documentation and learn about <refspec> instead of blindly guessing.

	[remote "origin"]
		fetch = +refs/heads/*:refs/remotes/origin/*
	        fetch = +refs/replace/*:refs/replace/*

would be syntactically more correct. That would blindly fetch each and every replace refs from the other side and apply the replacement.

It is questionable if it is a sensible thing to do, though.

"Git cabal" has been discussing a plan to make this easier but it is not quite ready to outline here yet. Perhaps after I return from my vacation post 1.8.0 release ;-)

Previous: Christian Couder
Message 5 of 5 in “Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?”
  1. David ChantersSep 15, 2012
  2. Junio C HamanoSep 15, 2012
  3. David ChantersSep 15, 2012
  4. Christian CouderSep 16, 2012
  5. Junio C HamanoSep 16, 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.