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

Re: [PATCH] [RFC] list-objects-filter: introduce new filter sparse:buffer=<spec>

From
ZheNing Hu <adlternative@gmail.com>
Date
Aug 9, 2022, 06:13 UTC
Message-ID
<CAOLTT8TSyKArOKTjbuGO=OkpciS6DH0mmVPSmiidOSHxo4thNQ@mail.gmail.com>
In-Reply-To
<xmqqczdau2yd.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2022年8月9日周二 00:15写道:
Show 15 quoted lines
>
> "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: ZheNing Hu <adlternative@gmail.com>
> >
> > Although we already had a `--filter=sparse:oid=<oid>` which
> > can used to clone a repository with limited objects which meet
> > filter rules in the file corresponding to the <oid> on the git
> > server. But it can only read filter rules which have been record
> > in the git server before.
>
> Was the reason why we have "we limit to an object we already have"
> restriction because we didn't want to blindly use a piece of
> uncontrolled arbigrary end-user data here?  Just wondering.
>
* An end-user's maybe doesn't even have write access to the repository,
so they can't config a filterspec file before git clone, what should they
do now?
* If there are  thousands of  different developers use the same git repo,
and they use "--filter=sparse:oid" to do different partial-clone, then how
many filterspec file should repo managers config first?
* Why not carefully check "uncontrolled arbigrary end-user data" here,
such as add a config like "partialclone.sparsebufferlimit" to limit transport
data size, or check if filterspec file is legal? Or if git server
don't trust its
user... we can use a config to ban this filter, And within some companies,
users can basically be trusted.
 * I'm sure it would be beneficial to let the filtering rules be configured
by the user, because now many people have such needs: download
only a few of files of directories of the repository.
* sparse-checkout + partial-clone is a good reference: we have a
".git/info/sparse-checkout" for record what we actually want to checkout to
work-tree, and it will fetch some missing git objects which record in
".git/info/sparse-checkout" from git server. I know it use <oid> to fetch
objects one by one instead of "path"... But In hindsight, its performance is
extraordinarily bad as a result...

Anyway, this patch represents some of my complaints about the current partial-clone feature and I hope the community will move forward with it.

Thanks.
ZheNing Hu
Previous: Junio C HamanoNext: Derrick Stolee
Message 3 of 9 in “[RFC] list-objects-filter: introduce new filter sparse:buffer=<spec>”
  1. [RFC] list-objects-filter: introduce new filter sparse:buffer=<spec>ZheNing Hu via GitGitGadget, Aug 8, 2022
  2. Junio C HamanoAug 8, 2022
  3. ZheNing HuAug 9, 2022
  4. Derrick StoleeAug 9, 2022
  5. Jeff KingAug 10, 2022
  6. ZheNing HuAug 12, 2022
  7. Jeff KingAug 14, 2022
  8. ZheNing HuAug 12, 2022
  9. ZheNing HuAug 26, 2022

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.