diff options
Diffstat (limited to 'pathspec.c')
-rw-r--r-- | pathspec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pathspec.c b/pathspec.c index ba6408a74c..5c9631a1a1 100644 --- a/pathspec.c +++ b/pathspec.c @@ -370,9 +370,13 @@ void parse_pathspec(struct pathspec *pathspec, pathspec->magic |= item[i].magic; } - if (pathspec->magic & PATHSPEC_MAXDEPTH) + + if (pathspec->magic & PATHSPEC_MAXDEPTH) { + if (flags & PATHSPEC_KEEP_ORDER) + die("BUG: PATHSPEC_MAXDEPTH_VALID and PATHSPEC_KEEP_ORDER are incompatible"); qsort(pathspec->items, pathspec->nr, sizeof(struct pathspec_item), pathspec_item_cmp); + } } /* |