dir.c: support marking some patterns already matched
commitc62a91736a6dcd909167cf9fbb751d65c85482dd
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Mon, 15 Feb 2016 09:03:38 +0000 (15 16:03 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Feb 2016 23:32:32 +0000 (15 15:32 -0800)
treecb3dbd66d3c3397585a32bc73af891508d8a3fae
parentbac65a2be598811d944c846bdf61580f5c1af927
dir.c: support marking some patterns already matched

Given path "a" and the pattern "a", it's matched. But if we throw path
"a/b" to pattern "a", the code fails to realize that if "a" matches
"a" then "a/b" should also be matched.

When the pattern is matched the first time, we can mark it "sticky", so
that all files and dirs inside the matched path also matches. This is a
simpler solution than modify all match scenarios to fix that.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
dir.h