Git commit causes data download in partial clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux