Tell users that git protocol is not for pushing
PATCH 1/1 Tell users that git protocol is not for pushing
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(-)
transport.c +3 -1
@@ -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); }
Signature · 1 line
1.6.0.4
Nathan W. Panike, Tue, Nov 11, 2008 06:06:16 +0100:
Quoted 7 lines
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.
But it does. See git daemon --help, look for receive-pack.