diff options
author | Taylor Blau <me@ttaylorr.com> | 2020-12-03 13:55:13 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-03 12:42:29 -0800 |
commit | aab179d937379e28c67dcab0a46fdba05c11d919 (patch) | |
tree | 6d7a91e60b0c5f4fba63936f842fbf3fdccb0bb2 /compat/regex/regcomp.c | |
parent | Tenth batch (diff) | |
download | tgif-aab179d937379e28c67dcab0a46fdba05c11d919.tar.xz |
builtin/clone.c: don't ignore transport_fetch_refs() errors
If 'git clone' couldn't execute 'transport_fetch_refs()' (e.g., because
of an error on the remote's side in 'git upload-pack'), then it will
silently ignore it.
Even though this has been the case at least since clone was ported to C
(way back in 8434c2f1af (Build in clone, 2008-04-27)), 'git fetch'
doesn't ignore these and reports any failures it sees.
That suggests that ignoring the return value in 'git clone' is simply an
oversight that should be corrected. That's exactly what this patch does.
(Noticing and fixing this is no coincidence, we'll want it in the next
patch in order to demonstrate a regression in 'git upload-pack' via a
'git clone'.)
There's no additional logging here, but that matches how 'git fetch'
handles the same case. An assumption there is that whichever part of
transport_fetch_refs() fails will complain loudly, so any additional
logging here is redundant.
Co-authored-by: Jeff King <peff@peff.net>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/regex/regcomp.c')
0 files changed, 0 insertions, 0 deletions