# [PATCH] ls-remote.txt: delete unsupported option

2 messages from 2015-09-28 to 2015-09-28. Participants: Nguyễn Thái Ngọc Duy, Junio C Hamano.
Thread: https://gitlist.dev/t/40439

## Nguyễn Thái Ngọc Duy, 2015-09-28 12:30

Subject: [PATCH] ls-remote.txt: delete unsupported option
Message-ID: <1443443417-20235-1-git-send-email-pclouds@gmail.com>
URL: https://gitlist.dev/e/1443443417-20235-1-git-send-email-pclouds%40gmail.com

```
-u <exec> has never been supported, but it was mentioned since
0a2bb55 (git ls-remote: make usage string match manpage -
2008-11-11). Nobody has complained about it for seven years, it's
probably safe to say nobody cares. So let's remove "-u" in documents
instead of adding code to support it.

While at there, fix --upload-pack syntax too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 Documentation/git-ls-remote.txt | 3 +--
 builtin/ls-remote.c             | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 2e22915..d510c05 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -9,7 +9,7 @@ git-ls-remote - List references in a remote repository
 SYNOPSIS
 --------
 [verse]
-'git ls-remote' [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]
+'git ls-remote' [--heads] [--tags]  [--upload-pack=<exec>]
 	      [--exit-code] <repository> [<refs>...]
 
 DESCRIPTION
@@ -29,7 +29,6 @@ OPTIONS
 	both, references stored in refs/heads and refs/tags are
 	displayed.
 
--u <exec>::
 --upload-pack=<exec>::
 	Specify the full path of 'git-upload-pack' on the remote
 	host. This allows listing references from repositories accessed via
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 4554dbc..5e9d545 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -4,7 +4,7 @@
 #include "remote.h"
 
 static const char ls_remote_usage[] =
-"git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]\n"
+"git ls-remote [--heads] [--tags]  [--upload-pack=<exec>]\n"
 "                     [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
 
 /*
-- 
2.3.0.rc1.137.g477eb31

```

## Junio C Hamano, 2015-09-28 17:43

Subject: Re: [PATCH] ls-remote.txt: delete unsupported option
Message-ID: <xmqq37xye8x3.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqq37xye8x3.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <1443443417-20235-1-git-send-email-pclouds@gmail.com>

```
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> -u <exec> has never been supported, but it was mentioned since
> 0a2bb55 (git ls-remote: make usage string match manpage -
> 2008-11-11). Nobody has complained about it for seven years, it's
> probably safe to say nobody cares. So let's remove "-u" in documents
> instead of adding code to support it.

This sounds OK.

A potential argument for consistency with fetch does not even apply,
as over there --upload-pack and -u are different options.



>
> While at there, fix --upload-pack syntax too.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  Documentation/git-ls-remote.txt | 3 +--
>  builtin/ls-remote.c             | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
> index 2e22915..d510c05 100644
> --- a/Documentation/git-ls-remote.txt
> +++ b/Documentation/git-ls-remote.txt
> @@ -9,7 +9,7 @@ git-ls-remote - List references in a remote repository
>  SYNOPSIS
>  --------
>  [verse]
> -'git ls-remote' [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]
> +'git ls-remote' [--heads] [--tags]  [--upload-pack=<exec>]
>  	      [--exit-code] <repository> [<refs>...]
>  
>  DESCRIPTION
> @@ -29,7 +29,6 @@ OPTIONS
>  	both, references stored in refs/heads and refs/tags are
>  	displayed.
>  
> --u <exec>::
>  --upload-pack=<exec>::
>  	Specify the full path of 'git-upload-pack' on the remote
>  	host. This allows listing references from repositories accessed via
> diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
> index 4554dbc..5e9d545 100644
> --- a/builtin/ls-remote.c
> +++ b/builtin/ls-remote.c
> @@ -4,7 +4,7 @@
>  #include "remote.h"
>  
>  static const char ls_remote_usage[] =
> -"git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]\n"
> +"git ls-remote [--heads] [--tags]  [--upload-pack=<exec>]\n"
>  "                     [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
>  
>  /*

```
