Doing blobless clone by default; switching between blobless, treeless and full clones by a command

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

 



Hello,

the most common workflow to see and change files of a repository is to do  git clone.  With --filter=blob:none this process can be sped up.  Blobless and blobfull clones have their trade offs.

I think these additions to git would be useful:

• add a config option to do by default blobless clone, when just  git clone URL  is invoked.
• add a git command to download all locally missing history, including for treeless clones and blobless clones
• add a git command to convert a repository to pure treeless or pure blobless clone (that is delete some commits) - to save disk space.

The git command to download all locally missing history should show how much per cent it has completed and after Ctrl+C interrupts, when the command is reissued, it should resume downloading the remaining data.

Rationale:

The reason people execute  git clone  is hardly to issue immediately afterwards  git log  or  git annotate.  The reason for git clone is to (try changing something and then) build the software. (Provided that git manages source code.)  Doing by default a reduced data download with  git clone  will sped up the initialization, it will save bytes in transit and reduce server load.  In fact I think that by default (without extra configuration)  git clone  should do a reduced download (blobless) and
git should download the other things, when asked to do so.  This default download preference should be ideally managed by an option in global gitconfig .  When looking at https://git-scm.com/docs/git-config for “filter” I do not recognize anything relevant.

For the latter https://stackoverflow.com/questions/76770003/is-there-a-way-to-configure-git-to-clone-with-filter-blobnone-by-default suggests adding a variable GITFLAGS='--filter=blob:none' .

There might be already commands to switch a repository to: full download, blobless clone, treeless clone, but I do not know these.  In any case, if it is possible to switch easily between full and blobless repository, in both directions, for me it only makes sense if by default the downloads are blobless.

Greetings
  Дилян





[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