|
1 | 1 | #include "builtin.h" |
2 | 2 | #include "gettext.h" |
3 | 3 |
|
4 | | -int cmd_psuh(int argc UNUSED, const char **argv UNUSED, |
5 | | - const char *prefix UNUSED, struct repository *repo UNUSED) { |
6 | | - printf(_("Pony saying hello goes here.\n")); |
7 | | - return 0; |
| 4 | +int cmd_psuh(int argc, const char **argv, |
| 5 | + const char *prefix, struct repository *repo) { |
| 6 | + int i; |
| 7 | + const char *config_name; |
| 8 | + printf(_("Pushing to %s\n"), repo->name); |
| 9 | + printf(_("Pushing to %s\n"), repo->url); |
| 10 | + printf(Q_("Your args (there is %d):\n", |
| 11 | + "Your args (there are %d):\n", |
| 12 | + argc), |
| 13 | + argc); |
| 14 | + for (i = 0; i < argc; i++) |
| 15 | + printf("%d: %s\n", i, argv[i]); |
| 16 | + |
| 17 | + printf(_("Your current working directory:\n<top-level>%s%s\n"), |
| 18 | + prefix ? "/" : "", prefix ? prefix : ""); |
| 19 | + |
| 20 | + repo_config(repo, git_default_config, NULL); |
| 21 | + |
| 22 | + if (repo_config_get_string_tmp(repo, "user.name", &config_name)) |
| 23 | + printf(_("No name is found in config\n")); |
| 24 | + else |
| 25 | + printf(_("Your name: %s\n"), config_name); |
| 26 | + |
| 27 | + return 0; |
8 | 28 | } |
0 commit comments