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) ...@@ -430,14 +430,14 @@ int main (int argc, char** argv)
printf("\n*Config Listing*\n"); printf("\n*Config Listing*\n");
const char *email; const char *email;
int j; int32_t j;
git_config *cfg; git_config *cfg;
// Open a config object so we can read global values from it. // Open a config object so we can read global values from it.
git_config_open_ondisk(&cfg, "~/.gitconfig"); 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); printf("Autocorrect: %d\n", j);
git_config_get_string(cfg, "user.email", &email); git_config_get_string(cfg, "user.email", &email);
......
...@@ -119,7 +119,7 @@ int fetch(git_repository *repo, int argc, char **argv) ...@@ -119,7 +119,7 @@ int fetch(git_repository *repo, int argc, char **argv)
if (error < GIT_SUCCESS) if (error < GIT_SUCCESS)
return error; return error;
git__free(packname); free(packname);
git_indexer_free(idx); git_indexer_free(idx);
git_remote_free(remote); git_remote_free(remote);
......
...@@ -44,7 +44,8 @@ int main(int argc, char **argv) ...@@ -44,7 +44,8 @@ int main(int argc, char **argv)
int i, error; int i, error;
if (argc < 2) { 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) { for (i = 0; commands[i].name != NULL; ++i) {
...@@ -53,5 +54,5 @@ int main(int argc, char **argv) ...@@ -53,5 +54,5 @@ int main(int argc, char **argv)
} }
fprintf(stderr, "Command not found: %s\n", argv[1]); 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