git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nathan W. Panike" <nathan.panike@gmail.com>
To: git@vger.kernel.org
Cc: "Nathan W. Panike" <nathan.panike@gmail.com>
Subject: [PATCH] Tell users that git protocol is not for pushing
Date: Mon, 10 Nov 2008 23:06:16 -0600	[thread overview]
Message-ID: <1226379976-5959-1-git-send-email-nathan.panike@gmail.com> (raw)

When one attempts to push to a git-protocol repository, one gets the
line:

fatal: The remote end hung up unexpectedly

This seems a bit obscure to me.  It is better to inform the user that git://
does not allow pushing.
---
 transport.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/transport.c b/transport.c
index 56831c5..2c1577e 100644
--- a/transport.c
+++ b/transport.c
@@ -684,7 +684,9 @@ static int git_transport_push(struct transport *transport, int refspec_nr, const
 	args.use_thin_pack = data->thin;
 	args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);
 	args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
-
+	if(strncmp(transport->url,"git",3)==0){
+		fprintf(stderr,"git protocol does not support push.\n");
+	}
 	return send_pack(&args, transport->url, transport->remote, refspec_nr, refspec);
 }
 
-- 
1.6.0.4

             reply	other threads:[~2008-11-11  5:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11  5:06 Nathan W. Panike [this message]
2008-11-11  7:24 ` [PATCH] Tell users that git protocol is not for pushing Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1226379976-5959-1-git-send-email-nathan.panike@gmail.com \
    --to=nathan.panike@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).