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

Re: Pushing tag from a partial clone

From
Derrick Stolee <stolee@gmail.com>
Date
Jul 20, 2020, 12:18 UTC
Message-ID
<3e68d3a1-01e6-4ce3-eee1-bc9fb07a1825@gmail.com>
In-Reply-To
<0DEFACA7-9D30-4DB1-9FDF-3E63945FAAB3@gmail.com>
On 7/20/2020 7:44 AM, Son Luong Ngoc wrote:
Show 26 quoted lines
> Hi folks,
> 
> At $day_job, we are trying to push tags to a repo from a partial clone copy.
> However it seems like this push would requires the partial clone copy to download more objects?
> Is this intended?
> 
> Reproduce:
> 
> 	mkdir repo && cd repo
> 	git init
> 	git remote add origin git@domain.com:path/repo.git
> 	git fetch --filter=tree:0 --no-tags --prune origin <commit-id>
> 	git sparse-checkout init --cone
> 	git checkout --force <commit-id>
> 	git tag -a sluongng-test -m "Test push from partial clone"
> 	git push HEAD:refs/tags/sluongng-test
> 	<git starts to download objects>
> 
> Ideally we would like to be able to push tag from a shallow + partial clone repo without 
> having to download extra objects if possible.
> We would like to keep the required repo to the absolute minimum.
> 	git fetch --depth 1 --filter=tree:0 --no-tags --prune origin <commit-id>
> 
> Creating and pushing tags should not require local repo to have trees/blobs in it?
> 
> Git version: 2.27.0

Could you try this again with 2.28.0-rc1? I think Jonathan Tan added the "no-fetch" flag in more places since 2.27.0, and this might already be fixed.

Thanks, -Stolee

Previous: Son Luong NgocNext: Son Luong Ngoc
Message 2 of 4 in “Pushing tag from a partial clone”
  1. Son Luong NgocJul 20, 2020
  2. Derrick StoleeJul 20, 2020
  3. Son Luong NgocJul 20, 2020
  4. Jonathan TanJul 20, 2020

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.