X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/135b231160b4c4e25b70e9e31e6df2bcf9e12c56..f92ca06e4bcb4aee051e199a8148c42210ec7a80:/ui-plain.c?ds=sidebyside diff --git a/ui-plain.c b/ui-plain.c index be559e0..e08b15b 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -18,7 +18,7 @@ static void print_object(const unsigned char *sha1, const char *path) { enum object_type type; char *buf; - size_t size; + unsigned long size; type = sha1_object_info(sha1, &size); if (type == OBJ_BAD) { @@ -46,7 +46,8 @@ static int walk_tree(const unsigned char *sha1, const char *base, int baselen, if (S_ISDIR(mode)) return READ_TREE_RECURSIVE; - if (S_ISREG(mode)) + if (S_ISREG(mode) && !strncmp(base, match_path, baselen) && + !strcmp(pathname, match_path + baselen)) print_object(sha1, pathname); return 0;