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

bc/update examples
This commit is contained in:
Vicent Martí 2011-11-07 06:27:49 -08:00
commit 38068dc1d3
4 changed files with 7 additions and 5 deletions

View File

@ -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
View File

@ -0,0 +1 @@
/git2

View File

@ -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);

View File

@ -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;
}