author | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 9 Nov 2009 10:47:34 +0000 (04:47 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 10 Nov 2009 19:59:51 +0000 (11:59 -0800) | ||
commit | 548d3464dc446db58a8fc8f7a8cc6cfb2d683faa | |
tree | ca41163c421bac78146a8fc6a63e9ae6065cb698 | tree | snapshot |
parent | 616f86d71325da1ce692f8e878fe066758f88554 | commit | diff |
Show usage string for 'git http-push -h'
http-push already knows how to dump usage if it is given no options, but
it interprets '-h' as the URL to a remote repository:
$ git http-push -h
error: Cannot access URL -h/, return code 6
Dump usage instead. Humans wanting to pass the URL -h/ to curl for some
reason can use 'git http-push -h/' explicitly. Scripts expecting to
access an HTTP repository at URL '-h' will break, though.
Also delay finding a git directory until after option parsing, so
"http-push -h" can be used outside any git repository.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push already knows how to dump usage if it is given no options, but
it interprets '-h' as the URL to a remote repository:
$ git http-push -h
error: Cannot access URL -h/, return code 6
Dump usage instead. Humans wanting to pass the URL -h/ to curl for some
reason can use 'git http-push -h/' explicitly. Scripts expecting to
access an HTTP repository at URL '-h' will break, though.
Also delay finding a git directory until after option parsing, so
"http-push -h" can be used outside any git repository.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c | diff | blob | history |