diff --git a/ssh-upload.c b/ssh-upload.c
index 603abcc8c3da9029a50fb7a2e76b0d6f70e2abeb..2da66618fcdd6a0f5af35c9f30554a65eb427427 100644 (file)
--- a/ssh-upload.c
+++ b/ssh-upload.c
prog = getenv(COUNTERPART_ENV_NAME);
if (!prog) prog = COUNTERPART_PROGRAM_NAME;
prog = getenv(COUNTERPART_ENV_NAME);
if (!prog) prog = COUNTERPART_PROGRAM_NAME;
+
+ setup_git_directory();
+
while (arg < argc && argv[arg][0] == '-') {
if (argv[arg][1] == 'w')
arg++;
while (arg < argc && argv[arg][0] == '-') {
if (argv[arg][1] == 'w')
arg++;
commit_id = argv[arg];
url = argv[arg + 1];
if (get_sha1(commit_id, sha1))
commit_id = argv[arg];
url = argv[arg + 1];
if (get_sha1(commit_id, sha1))
- usage(ssh_push_usage);
+ die("Not a valid object name %s", commit_id);
memcpy(hex, sha1_to_hex(sha1), sizeof(hex));
argv[arg] = hex;
memcpy(hex, sha1_to_hex(sha1), sizeof(hex));
argv[arg] = hex;