Re: [PATCH v1 1/8] fetch-object: make functions return an error code
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 15, 2018, 01:28 UTC
- Message-ID
- <xmqqmux1aes7.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180513103232.17514-2-chriscool@tuxfamily.org>
Christian Couder <christian.couder@gmail.com> writes:
Show 9 quoted lines
> The callers of the fetch_object() and fetch_objects() might > be interested in knowing if these functions succeeded or not. > > Signed-off-by: Christian Couder <chriscool@tuxfamily.org> > --- > fetch-object.c | 15 +++++++++------ > fetch-object.h | 6 +++--- > sha1-file.c | 4 ++-- > 3 files changed, 14 insertions(+), 11 deletions(-)
"might", but nobody pays attention to the return value, as the local availablity of the object at the end is the only thing that matters, so at this step, it is not all that impactful a change.
Let's see how it plays out.
Show 8 quoted lines
> /* > - * TODO Investigate haveing fetch_object() return > - * TODO error/success and stopping the music here. > + * TODO Investigate checking fetch_object() return > + * TODO value and stopping on error here. > */ > fetch_object(repository_format_partial_clone, real->hash); > already_retried = 1;