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

Re: Question relate to collaboration on git monorepo

From
Derrick Stolee <derrickstolee@github.com>
Date
Sep 22, 2022, 14:24 UTC
Message-ID
<1c2f6cfe-a6db-c06e-5313-f5b31be42c8d@github.com>
In-Reply-To
<CABPp-BEBB1oqdVcXrWwMAdtb0TwHZvr-6KDa210j5ncw54Di_g@mail.gmail.com>
On 9/21/2022 7:36 PM, Elijah Newren wrote:
> On Wed, Sep 21, 2022 at 8:22 AM ZheNing Hu <adlternative@gmail.com> wrote:
Show 26 quoted lines
> Here, we do have an object download, which occurred after the merge
> completed, so there must be something happening after the merge which
> needs the extra blob; if we keep reading...
> 
>>  project1/file1 | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
> 
> Ah, the 'helpful' diffstat.  It downloads blobs from a promisor remote
> just so we can see what has changed, including in the area of the
> project we don't care about.
> 
> (This is yet another reason it'd be nice to have a --restrict mode for
> grep/diff/log/etc. for sparse-checkout uses, and an ability to make it
> the default in some repo, so you could get just the diffstat within
> the region of the project that you care about.  We're discussing such
> an idea, but it isn't implemented yet.)
> 
>> warning: This repository uses promisor remotes. Some objects may not be loaded.
>> blob_count1=11
>> blob_count2=11
>> blob_count3=12
>>
>> The result shows that blob count doesn't change in git fetch, but in git merge.
> 
> If you add --no-stat to your merge command (or set merge.stat to
> false), the extra blob will not be downloaded.

This is an interesting find! I wonder how many people are hitting this in the wild. Perhaps merge.stat should be added to the optional, but recommended config options in scalar.c.

Thanks, -Stolee

Previous: Elijah NewrenNext: Emily Shaffer
Message 5 of 12 in “Question relate to collaboration on git monorepo”
  1. ZheNing HuSep 20, 2022
  2. Emily ShafferSep 20, 2022
  3. ZheNing HuSep 21, 2022
  4. Elijah NewrenSep 21, 2022
  5. Derrick StoleeSep 22, 2022
  6. Emily ShafferSep 22, 2022
  7. Elijah NewrenSep 23, 2022
  8. Junio C HamanoSep 23, 2022
  9. Derrick StoleeSep 23, 2022
  10. ZheNing HuSep 23, 2022
  11. Elijah NewrenSep 21, 2022
  12. ZheNing HuSep 21, 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.