{"thread":{"id":"16258","subject":"[PATCH] Tell users that git protocol is not for pushing","startedAt":"2008-11-11T05:06:16Z","lastAt":"2008-11-11T07:24:55Z","messageCount":2,"participants":["Nathan W. Panike","Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"95428","messageId":"1226379976-5959-1-git-send-email-nathan.panike@gmail.com","threadId":"16258","inReplyTo":null,"subject":"[PATCH] Tell users that git protocol is not for pushing","fromName":"Nathan W. Panike","fromEmail":"nathan.panike@gmail.com","sentAt":"2008-11-11T05:06:16Z","receivedAt":"2008-11-11T05:06:16Z","isPatch":true,"sender":{"key":"nathan.panike@gmail.com","avatar":"https://avatars.githubusercontent.com/u/389447?v=4"},"body":"When one attempts to push to a git-protocol repository, one gets the\nline:\n\nfatal: The remote end hung up unexpectedly\n\nThis seems a bit obscure to me.  It is better to inform the user that git://\ndoes not allow pushing.\n---\n transport.c |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/transport.c b/transport.c\nindex 56831c5..2c1577e 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -684,7 +684,9 @@ static int git_transport_push(struct transport *transport, int refspec_nr, const\n \targs.use_thin_pack = data->thin;\n \targs.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);\n \targs.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);\n-\n+\tif(strncmp(transport->url,\"git\",3)==0){\n+\t\tfprintf(stderr,\"git protocol does not support push.\\n\");\n+\t}\n \treturn send_pack(&args, transport->url, transport->remote, refspec_nr, refspec);\n }\n \n-- \n1.6.0.4\n"},{"id":"95439","messageId":"20081111072455.GA4206@blimp.localdomain","threadId":"16258","inReplyTo":"1226379976-5959-1-git-send-email-nathan.panike@gmail.com","subject":"Re: [PATCH] Tell users that git protocol is not for pushing","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-11-11T07:24:55Z","receivedAt":"2008-11-11T07:24:55Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Nathan W. Panike, Tue, Nov 11, 2008 06:06:16 +0100:\n> When one attempts to push to a git-protocol repository, one gets the\n> line:\n> \n> fatal: The remote end hung up unexpectedly\n> \n> This seems a bit obscure to me.  It is better to inform the user that git://\n> does not allow pushing.\n\nBut it does. See git daemon --help, look for receive-pack.\n"}]}