X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ssh-fetch.c;h=683a1e4a01f250043324ae49fe61cc33470ceb9c;hb=b5cf3c8b7767e5f2c8b0df718ef91ccfc36c61fe;hp=d8f4368bc5eb09c3303a2a9cdbfb5bf395a6dcdf;hpb=215a7ad1ef790467a4cd3f0dcffbd6e5f04c38f7;p=git.git diff --git a/ssh-fetch.c b/ssh-fetch.c index d8f4368b..683a1e4a 100644 --- a/ssh-fetch.c +++ b/ssh-fetch.c @@ -1,3 +1,13 @@ +#ifndef COUNTERPART_ENV_NAME +#define COUNTERPART_ENV_NAME "GIT_SSH_UPLOAD" +#endif +#ifndef COUNTERPART_PROGRAM_NAME +#define COUNTERPART_PROGRAM_NAME "git-ssh-upload" +#endif +#ifndef MY_PROGRAM_NAME +#define MY_PROGRAM_NAME "git-ssh-fetch" +#endif + #include "cache.h" #include "commit.h" #include "rsh.h" @@ -82,6 +92,9 @@ int fetch_ref(char *ref, unsigned char *sha1) return 0; } +static const char ssh_fetch_usage[] = + MY_PROGRAM_NAME + " [-c] [-t] [-a] [-v] [-d] [--recover] [-w ref] commit-id url"; int main(int argc, char **argv) { char *commit_id; @@ -110,7 +123,7 @@ int main(int argc, char **argv) arg++; } if (argc < arg + 2) { - usage("git-ssh-fetch [-c] [-t] [-a] [-v] [-d] [--recover] [-w ref] commit-id url"); + usage(ssh_fetch_usage); return 1; } commit_id = argv[arg];