git cl patch downloads several gbs of data |
|||
Issue descriptionWhat 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.
,
Mar 1 2018
Also seeing this
,
Mar 3 2018
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 |
|||
Comment 1 by xidac...@chromium.org
, Feb 13 2018