New issue
Advanced search Search tips

Issue 807323 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

git cl patch downloads several gbs of data

Project Member Reported by offenwanger@chromium.org, Jan 30 2018

Issue description

What steps will reproduce the problem?
(1) Clone a chrome repo with the --no-history flag
(2) Attempt to patch in a CL

What is the expected result? 
Patching the several dozen line change takes a couple minutes at most.

What happens instead? 
The tool proceeds to download 8Gb of data, resolve deltas, then apparently apply the small patch.
 
Labels: -Pri-3 Pri-1
Bump to p1, this is a serious issue. I am trying to patch a CL on mac, and it keeps counting objects for 15 mins and eventually I hit ctrl+c
Components: Infra>SDK
Also seeing this
Owner: aga...@chromium.org
Status: WontFix (was: Untriaged)
This is expected and there's no easy way around it.

When you do a "git cl patch", that effectively turns into a "git fetch" of the remote ref representing the change you want to patch in. But if your shallow clone was created after the change you want was branched from master, then your repo and that change ref have no shared history. So when your local git repo tries to negotiate with the remote about what to fetch, the answer the remote gives is "everything". This then turns out to be much slower than just a "git clone", because our git host has optimizations for cloning the repo that don't apply when fetching a change ref.

As a rule, we do not support shallow checkouts and workflows. You use them at your own risk, and we do not guarantee that our development tools will play well with them.

Sign in to add a comment