download/git: quickly exit when the cset does not exist
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 1 May 2018 08:44:11 +0000 (10:44 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 1 May 2018 19:22:28 +0000 (21:22 +0200)
commit428a0649fff33b43243d64e9e1556bc00811e9b6
tree653e983f0e69a9a21cb179f871f1a0d765583077
parent577315687ff0b2209ced50974563fb72548bb85e
download/git: quickly exit when the cset does not exist

Check that the given cset is indeed something we can checkout. If not,
then exit early.

This will be useful when a later commit will trap any failing git
command to try to recover the repository by doing a clone from scratch:
when the cset is not a commit, it does not mean the repository is broken
or what, and re-cloning from scratch would not help, so no need to trash
a good cache.

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/download/git