question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow for shallow updates

See original GitHub issue

For verification purposes, it would be nice to init and fetch only versions from the manifest file. So issuing:

west init
west update --shallow

or

west init --shallow
west update

Would create a minimal version of repository saving a lot of time for big projects.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:50 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
marc-hbcommented, Feb 25, 2021

@mbolivar-nordic just abandoned #475 and I’m not sure why.

I think giving #475 and #344 a name should help clarify concepts, I suggest “narrow”. I see roughly 4 classes of git clones in general use (with and without west)

  • LARGE git clone; git fetch --tags Slowest, biggest and best for airplane trips mentioned in #475. Current west default.

  • git’s DEFAULT git clone; git fetch All remote branches. “Opportunistic” tags only.

  • NARROW git clone --no-tags --single-branch git fetch ref_name_or_SHA Maximum optimization without breaking any git command. Savings can be huge in projects with many branches.

  • DEPTH1 a.k.a. “shallow” git clone --depth 1 Maximum savings and most git commands are broken by design. For CI and repetitive throw-away clones only, best avoided for persistent clones. In git’s documentation “shallow” means “truncated”, it does not mean depth 1. Git terminology can be confusing enough, better not diverge from it when not necessary.

Thanks to custom refspecs, intermediate --depth, different clone+fetch combinations, different git versions etc. the reality is not just these 4 points but actually a spectrum. However I think these 4 points should capture most real-world use cases and that these are the concepts west should present, not just DEPTH1.

The big difference fetch-pack’s uploadpack.allow*SHA1InWant makes: it simply forbids NARROW and DEPTH1 and forces a fallback on LARGE or DEFAULT (with a warning?) when what you want is a SHA1 instead of a tag or branch. #344 explored a revision-in trick to fall back on NARROW.

2reactions
czeslawmakarskicommented, Feb 5, 2021

@tejlmand Yes, I think that speeding-up the CI is the priority right now, so, no changes in manifest format, just a --shallow switch and west config to enable direct SHA fetching in the repos.

@marc-hb I see your reasoning - having discrepancies in the west.yml’s can be indeed a nightmare. For the time being let’s stick with the west config phase.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote rejected (shallow update not allowed) after changing ...
I have a project under Git version control that I worked on both a server and my local computer. I originally had the...
Read more >
Fix for Remote rejected shallow update not allowed after ...
Some Time there is a shallow update not allowed issue in your cloned GIT repo. This means that you have to unshallow your...
Read more >
How to fix Shallow update not allowed? - Trade Coder
How to fix Shallow update not allowed? This issue comes with cloning a project with Shallow Clone and you want to push your...
Read more >
Shallow update not allowed - Bitbucket - Atlassian Community
I'm trying to deploy a commit, but I'm getting a response that shallow update isn't allowed. In what way can I fix this...
Read more >
[remote rejected] HEAD -> master (shallow update not allowed)
I tried to merge some changes to master and got the following error: “! [remote rejected] HEAD -> master (shallow update not allowed)”....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found