author | Lars Hjemli <hjemli@gmail.com> | 2009-08-23 17:36:45 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-08-24 08:22:58 (UTC) |
commit | 50d5af3adcdd90424b70e9472af24356ed50aa9b (patch) (side-by-side diff) | |
tree | 758484a13b8226f64da1e7bde04bb5333beb1e0b /cgit.c | |
parent | 00466376922e2f7db02b3c335d46af5eb8991c49 (diff) | |
download | cgit-50d5af3adcdd90424b70e9472af24356ed50aa9b.zip cgit-50d5af3adcdd90424b70e9472af24356ed50aa9b.tar.gz cgit-50d5af3adcdd90424b70e9472af24356ed50aa9b.tar.bz2 |
Add support for --scan-path command line option
This is an alias for --scan-tree (which might be deprecated in the
future).
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -538,25 +538,26 @@ static void cgit_parse_args(int argc, const char **argv) } if (!strncmp(argv[i], "--head=", 7)) { ctx.qry.head = xstrdup(argv[i]+7); ctx.qry.has_symref = 1; } if (!strncmp(argv[i], "--sha1=", 7)) { ctx.qry.sha1 = xstrdup(argv[i]+7); ctx.qry.has_sha1 = 1; } if (!strncmp(argv[i], "--ofs=", 6)) { ctx.qry.ofs = atoi(argv[i]+6); } - if (!strncmp(argv[i], "--scan-tree=", 12)) { + if (!strncmp(argv[i], "--scan-tree=", 12) || + !strncmp(argv[i], "--scan-path=", 12)) { scan++; scan_tree(argv[i] + 12); } } if (scan) { qsort(cgit_repolist.repos, cgit_repolist.count, sizeof(struct cgit_repo), cmp_repos); print_repolist(stdout, &cgit_repolist, 0); exit(0); } } |