summaryrefslogtreecommitdiff
path: root/src/checkout.c
diff options
context:
space:
mode:
authoryorah <yoram.harmelin@gmail.com>2013-01-18 16:37:13 +0100
committeryorah <yoram.harmelin@gmail.com>2013-02-07 20:44:34 +0100
commit943700ecbbc2be4ef49c5c31d8e5c49353fd3d84 (patch)
tree4e49b623e5df6506acb995ed5b492ff18d658a18 /src/checkout.c
parent41713ec15f66d263c2d7d40dd07f1f5a468e3e22 (diff)
downloadlibgit2-943700ecbbc2be4ef49c5c31d8e5c49353fd3d84.tar.gz
Return the matched pathspec pattern in `git_pathspec_match_path`
Instead of returning directly the pattern as the return value, I used an out parameter, because the function also tests if the passed pathspecs vector is empty. If yes, it considers that the path "matches", but in that case there is no matched pattern per se.
Diffstat (limited to 'src/checkout.c')
-rw-r--r--src/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c
index 40f5732ed..0ce283beb 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -224,7 +224,7 @@ static int checkout_action_wd_only(
if (!git_pathspec_match_path(
pathspec, wd->path,
(data->strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH) != 0,
- git_iterator_ignore_case(workdir)))
+ git_iterator_ignore_case(workdir), NULL))
return 0;
/* check if item is tracked in the index but not in the checkout diff */