Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-11-22 01:04:42 +0300
committerJunio C Hamano <gitster@pobox.com>2019-11-22 10:11:44 +0300
commitaf09ce24a9c79f6efc12d1d8f1052e1d1dbe5016 (patch)
tree891fd159fc031e75616a0afea9ec33f7e39b3202 /dir.c
parent96cc8ab5318cd57c8bc203b8f064b35883b2386f (diff)
sparse-checkout: init and set in cone mode
To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout (init|set)'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckoutCone=true'. When running 'git sparse-checkout set' in cone mode, a user only needs to supply a list of recursive folder matches. Git will automatically add the necessary parent matches for the leading directories. When testing 'git sparse-checkout set' in cone mode, check the error stream to ensure we do not see any errors. Specifically, we want to avoid the warning that the patterns do not match the cone-mode patterns. Helped-by: Eric Wong <e@80x24.org> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index dfabf9982f..35c1ca9e24 100644
--- a/dir.c
+++ b/dir.c
@@ -611,10 +611,10 @@ void parse_path_pattern(const char **pattern,
*patternlen = len;
}
-static int pl_hashmap_cmp(const void *unused_cmp_data,
- const struct hashmap_entry *a,
- const struct hashmap_entry *b,
- const void *key)
+int pl_hashmap_cmp(const void *unused_cmp_data,
+ const struct hashmap_entry *a,
+ const struct hashmap_entry *b,
+ const void *key)
{
const struct pattern_entry *ee1 =
container_of(a, struct pattern_entry, ent);