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

Re: refs/replace advice

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 29, 2011, 15:49 UTC
Message-ID
<4E32D6A1.8020304@viscovery.net>
In-Reply-To
<20110729153122.GA4535@padd.com>
Am 7/29/2011 17:31, schrieb Pete Wyckoff:
Show 10 quoted lines
> I'm trying to use "git replace" to avoid cloning the entire set
> of duplicate commits across a slow inter-site link.  Like this:
> 
>     ...---A----B----C   site1/top
>                      \
>                       D---E---F  site1/proj
> 
>     ...---A'---B'---C'  site2/top
> 
> It is true that "git diff C C'" is empty:  they are identical.
...
> I thought maybe I could "git fetch --depth=N" where N would cover
> the range A'..site2/top, then replace.  But testing with "git
> fetch --depth=3" still wants to fetch 100k objects.

On site2, don't you want to 'git fetch --depth=N site1' such that F down to at least C (but not much more) is fetched, and then apply the graft or replacement on site2?

-- Hannes
Previous: Pete WyckoffNext: Pete Wyckoff
Message 2 of 4 in “refs/replace advice”
  1. Pete WyckoffJul 29, 2011
  2. Johannes SixtJul 29, 2011
  3. Pete WyckoffJul 29, 2011
  4. Pete WyckoffAug 2, 2011

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.