kumquat-buildroot/support/download
Yann E. MORIN 4f54c959dc download/git: always do full-clone
We currently attempt a shallow clone, as tentative to save bandwidth and
download time.

However, now that we keep the git tree as a cache, it may happen that we
need to checkout an earlier commit, and that would not be present with a
shallow clone.

Furthermore, the shallow fetch is already really broken, and just
happens to work by chance. Consider the following actions, which are
basically what happens today:

    mkdir git
    git init git
    cd git
    git remote add origin https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
    git fetch origin --depth 1 v4.17-rc1
    if ! git fetch origin v4.17-rc1:v4.17-rc1 ; then
        echo "warning"
    fi
    git checkout v4.17-rc1

The checkout succeeds just because of the git-fetch in the if-condition,
which is initially there to fetch the special refs from github PRs, or
gerrit reviews. That fails, but we just print a warning. If we were to
ever remove support for special refs, then the checkout would fail.

The whole purpose of the git cache is to actually save bandwidth and
download time, but in the long run. For one-offs, people would
preferably use a wget download (e.g. with the github macro) instead of
a git clone.

We switch to always doing a full clone. It is more correct, and pays off
in the long run...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-05-01 21:22:28 +02:00
..
bzr core/pkg-download: change all helpers to use common options 2018-04-02 12:22:50 +02:00
check-hash support/download: fix check_one_hash description 2017-09-19 22:11:30 +02:00
cvs download: put most of the infra in dl-wrapper 2018-04-02 14:19:51 +02:00
dl-wrapper support/download/dl-wrapper: pass the correct -N option 2018-04-12 22:54:00 +02:00
file core/download fix local backend 2018-04-06 12:43:47 +02:00
git download/git: always do full-clone 2018-05-01 21:22:28 +02:00
hg core/pkg-download: change all helpers to use common options 2018-04-02 12:22:50 +02:00
scp core/pkg-download: change all helpers to use common options 2018-04-02 12:22:50 +02:00
svn core/pkg-download: change all helpers to use common options 2018-04-02 12:22:50 +02:00
wget download: put most of the infra in dl-wrapper 2018-04-02 14:19:51 +02:00