unpack-trees(): "enable" sparse checkout and load $GIT_DIR/info/sparse-checkout
This patch introduces core.sparseCheckout, which will control whether sparse checkout support is enabled in unpack_trees() It also loads sparse-checkout file that will be used in the next patch. I split it out so the next patch will be shorter, easier to read. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
35a5aa79d0
commit
08aefc9e47
@ -4,6 +4,7 @@
|
||||
#define MAX_UNPACK_TREES 8
|
||||
|
||||
struct unpack_trees_options;
|
||||
struct exclude_list;
|
||||
|
||||
typedef int (*merge_fn_t)(struct cache_entry **src,
|
||||
struct unpack_trees_options *options);
|
||||
@ -28,6 +29,7 @@ struct unpack_trees_options {
|
||||
skip_unmerged,
|
||||
initial_checkout,
|
||||
diff_index_cached,
|
||||
skip_sparse_checkout,
|
||||
gently;
|
||||
const char *prefix;
|
||||
int pos;
|
||||
@ -44,6 +46,8 @@ struct unpack_trees_options {
|
||||
struct index_state *dst_index;
|
||||
struct index_state *src_index;
|
||||
struct index_state result;
|
||||
|
||||
struct exclude_list *el; /* for internal use */
|
||||
};
|
||||
|
||||
extern int unpack_trees(unsigned n, struct tree_desc *t,
|
||||
|
Reference in New Issue
Block a user