summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2016-08-15 14:53:24 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-15 15:28:01 -0700
commit9eeea7d2bc8132cfaa1b79271c077e80317f3ae1 (patch)
tree311909d3eefff75811402fcaaa95b51549645019 /cache.h
parentsubmodule--helper update-clone: allow multiple references (diff)
downloadtgif-9eeea7d2bc8132cfaa1b79271c077e80317f3ae1.tar.xz
clone: factor out checking for an alternate path
In a later patch we want to determine if a path is suitable as an alternate from other commands than builtin/clone. Move the checking functionality of `add_one_reference` to `compute_alternate_path` that is defined in cache.h. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index b5f76a4cf4..1087dcaa1f 100644
--- a/cache.h
+++ b/cache.h
@@ -1342,6 +1342,7 @@ extern struct alternate_object_database {
} *alt_odb_list;
extern void prepare_alt_odb(void);
extern void read_info_alternates(const char * relative_base, int depth);
+extern char *compute_alternate_path(const char *path, struct strbuf *err);
extern void add_to_alternates_file(const char *reference);
typedef int alt_odb_fn(struct alternate_object_database *, void *);
extern int foreach_alt_odb(alt_odb_fn, void*);