Skip to content

Commit 39878b0

Browse files
author
Junio C Hamano
committed
git-push reports the URL after failing.
This came up on #git when somebody was getting 'unable to create ./objects/tmp_oXXXX' but sweared he had write permission to that directory. It turned out that the repository URL was changed and he was accessing a repository he does not have a write permission anymore. I am not sure how much this would have helped somebody who believed he was accessing location when the permission of that location was changed while he was looking the other way, though. But giving more information on the error path would be better, and the next change would be helped with this as well. Signed-off-by: Junio C Hamano <[email protected]>
1 parent ee9693e commit 39878b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin-push.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ static int do_push(const char *repo)
339339
err = run_command_v_opt(argv, RUN_GIT_CMD);
340340
if (!err)
341341
continue;
342+
343+
error("failed to push to '%s'", uri[i]);
342344
switch (err) {
343345
case -ERR_RUN_COMMAND_FORK:
344346
die("unable to fork for %s", sender);

0 commit comments

Comments
 (0)