summaryrefslogtreecommitdiff
path: root/src/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/status.c b/src/status.c
index e9ad3cfe4..633082c09 100644
--- a/src/status.c
+++ b/src/status.c
@@ -176,10 +176,12 @@ static int get_one_status(const char *path, unsigned int status, void *data)
sfi->count++;
sfi->status = status;
- if (sfi->count > 1 || strcmp(sfi->expected, path) != 0) {
+ if (sfi->count > 1 ||
+ (strcmp(sfi->expected, path) != 0 &&
+ p_fnmatch(sfi->expected, path, 0) != 0)) {
giterr_set(GITERR_INVALID,
"Ambiguous path '%s' given to git_status_file", sfi->expected);
- return -1;
+ return GIT_EAMBIGUOUS;
}
return 0;