git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Son Luong Ngoc <sluongng@gmail.com>
To: git <git@vger.kernel.org>
Subject: Pushing tag from a partial clone
Date: Mon, 20 Jul 2020 13:44:35 +0200	[thread overview]
Message-ID: <0DEFACA7-9D30-4DB1-9FDF-3E63945FAAB3@gmail.com> (raw)

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

Cheers,
Son Luong.

             reply	other threads:[~2020-07-20 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 11:44 Son Luong Ngoc [this message]
2020-07-20 12:18 ` Pushing tag from a partial clone Derrick Stolee
2020-07-20 13:47   ` Son Luong Ngoc
2020-07-20 17:54     ` Jonathan Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0DEFACA7-9D30-4DB1-9FDF-3E63945FAAB3@gmail.com \
    --to=sluongng@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).