Commit 38068dc1 by Vicent Martí

Merge pull request #473 from drafnel/bc/update-examples

bc/update examples
parents 3b83bdac 0b142c9c
......@@ -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);
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment