]> granicus.if.org Git - cgit/commitdiff
scan-tree: add test for noweb-file in repo dir
authorLars Hjemli <hjemli@gmail.com>
Sun, 28 Feb 2010 17:40:02 +0000 (18:40 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sun, 28 Feb 2010 17:40:02 +0000 (18:40 +0100)
If such a file exists, the repo is not added to the repolist.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
scan-tree.c

index dbca7971105ae17732267822abe7049e98f2f523..1e18f3c9b89e72607fccaa3bc6574c7233c6fb41 100644 (file)
@@ -56,6 +56,8 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn)
                        path, strerror(errno), errno);
                return;
        }
+       if (!stat(fmt("%s/noweb", path), &st))
+               return;
        if ((pwd = getpwuid(st.st_uid)) == NULL) {
                fprintf(stderr, "Error reading owner-info for %s: %s (%d)\n",
                        path, strerror(errno), errno);