X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=tree-diff.c;h=b05d0f43555d28f872fd5225e6773eeb636ef302;hb=3db964b551827e25f897cc75ffd8e520ee8b48cd;hp=9f67af6c1fbb9130962cd373d8e2ebecf543c640;hpb=fcd3549ef239378d1d2ca11df9e8c91f7fa0ab2e;p=git.git diff --git a/tree-diff.c b/tree-diff.c index 9f67af6c1..b05d0f435 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -118,10 +118,16 @@ static int tree_entry_interesting(struct tree_desc *desc, const char *base, int continue; /* - * The base is a subdirectory of a path which - * was specified, so all of them are interesting. + * If the base is a subdirectory of a path which + * was specified, all of them are interesting. */ - return 2; + if (!matchlen || + base[matchlen] == '/' || + match[matchlen - 1] == '/') + return 2; + + /* Just a random prefix match */ + continue; } /* Does the base match? */