foreach_alt_odb: propagate return value from callback
We check the return value of the callback and stop iterating if it is non-zero. However, we do not make the non-zero return value available to the caller, so they have no way of knowing whether the operation succeeded or not (technically they can keep their own error flag in the callback data, but that is unlike our other for_each functions). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a136f6d8ff
commit
fe1b22686f
2
cache.h
2
cache.h
@ -1143,7 +1143,7 @@ extern void prepare_alt_odb(void);
|
||||
extern void read_info_alternates(const char * relative_base, int depth);
|
||||
extern void add_to_alternates_file(const char *reference);
|
||||
typedef int alt_odb_fn(struct alternate_object_database *, void *);
|
||||
extern void foreach_alt_odb(alt_odb_fn, void*);
|
||||
extern int foreach_alt_odb(alt_odb_fn, void*);
|
||||
|
||||
struct pack_window {
|
||||
struct pack_window *next;
|
||||
|
Reference in New Issue
Block a user