mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-10 16:00:04 +00:00
Initialize threading, fix broken strncmp
This commit is contained in:
parent
370d1d166e
commit
cb45dafaf8
@ -41,6 +41,8 @@ int main(int argc, char *argv[])
|
||||
git_tree_entry *entry;
|
||||
git_blob *blob;
|
||||
|
||||
git_threads_init();
|
||||
|
||||
if (argc < 2) usage(NULL, NULL);
|
||||
path = argv[1];
|
||||
|
||||
@ -51,7 +53,7 @@ int main(int argc, char *argv[])
|
||||
opts.flags |= GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES;
|
||||
else if (!strcmp(a, "-C"))
|
||||
opts.flags |= GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES;
|
||||
else if (!strncmp(a, "-L", 3)) {
|
||||
else if (!strcmp(a, "-L")) {
|
||||
i++; a = argv[i];
|
||||
if (i >= argc) check(-1, "Not enough arguments to -L");
|
||||
check(sscanf(a, "%d,%d", &opts.min_line, &opts.max_line)-2, "-L format error");
|
||||
@ -128,4 +130,5 @@ int main(int argc, char *argv[])
|
||||
git_commit_free(commit);
|
||||
git_blame_free(blame);
|
||||
git_repository_free(repo);
|
||||
git_threads_shutdown();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user