Git development
 help / color / mirror / Atom feed
* Git commit causes data download in partial clone
@ 2024-02-17 20:38 charmocc
  2024-02-20  2:43 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: charmocc @ 2024-02-17 20:38 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi everyone,

I was recently exploring git partial clone feature because I wanted to
contribute to repository which has a lot of binary files. My intent was to only
add new files without modifying any existing ones and to download as few data
as possible in the process. Here are the steps I followed:

$ git clone --no-checkout --filter=blob:none https://github.com/libretro-thumbnails/Nintendo_-_Nintendo_Entertainment_System.git nes
$ cd nes
$ echo foo > bar
$ git add bar
$ git commit bar # causes git fetch behind the scene and download of a lot of objects!

Now for reasons I don't understand the last command cause download of a lot of
objects from remote (blobs) which is what I was trying to avoid. By enabling
tracing options I can see that it runs fetch operation in the background:

git -c fetch.negotiationAlgorithm=noop fetch origin --no-tags --no-write-fetch-head --recurse-submodules=no --filter=blob:none --stdin

Unfortunately trace doesn't show what refspec is being used for the fetch 
operation. The regular "git fetch" doesn't cause any additional object 
downloads.

Is there something I'm doing wrong here or maybe what I'm trying to achieve 
(contribute to repository without downloading all of its files) is simply 
not possible?

git version 2.34.1 (Ubuntu 22.04)

Thanks for your time
charmocc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-22 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-17 20:38 Git commit causes data download in partial clone charmocc
2024-02-20  2:43 ` Jeff King
2024-02-22 19:34   ` charmocc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox