mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-21 16:56:53 +00:00
Merge pull request #473 from drafnel/bc/update-examples
bc/update examples
This commit is contained in:
commit
38068dc1d3
@ -430,14 +430,14 @@ int main (int argc, char** argv)
|
||||
printf("\n*Config Listing*\n");
|
||||
|
||||
const char *email;
|
||||
int j;
|
||||
int32_t j;
|
||||
|
||||
git_config *cfg;
|
||||
|
||||
// Open a config object so we can read global values from it.
|
||||
git_config_open_ondisk(&cfg, "~/.gitconfig");
|
||||
|
||||
git_config_get_int(cfg, "help.autocorrect", &j);
|
||||
git_config_get_int32(cfg, "help.autocorrect", &j);
|
||||
printf("Autocorrect: %d\n", j);
|
||||
|
||||
git_config_get_string(cfg, "user.email", &email);
|
||||
|
1
examples/network/.gitignore
vendored
Normal file
1
examples/network/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/git2
|
@ -119,7 +119,7 @@ int fetch(git_repository *repo, int argc, char **argv)
|
||||
if (error < GIT_SUCCESS)
|
||||
return error;
|
||||
|
||||
git__free(packname);
|
||||
free(packname);
|
||||
git_indexer_free(idx);
|
||||
git_remote_free(remote);
|
||||
|
||||
|
@ -44,7 +44,8 @@ int main(int argc, char **argv)
|
||||
int i, error;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "usage: %s <cmd> [repo]", argv[0]);
|
||||
fprintf(stderr, "usage: %s <cmd> [repo]\n", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
for (i = 0; commands[i].name != NULL; ++i) {
|
||||
@ -53,5 +54,5 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
fprintf(stderr, "Command not found: %s\n", argv[1]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user