# [PATCH] builtin-push: New long option --verbose

8 messages from 2007-08-27 to 2007-08-27. Participants: Jari Aalto, Junio C Hamano, Johannes Schindelin, David Kågedal.
Thread: https://gitlist.dev/t/9670

## Jari Aalto, 2007-08-27 06:49

Subject: [PATCH] builtin-push: New long option --verbose
Message-ID: <y7fxeal4.fsf@cante.net>
URL: https://gitlist.dev/e/y7fxeal4.fsf%40cante.net

```
Implemented and documented new option.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 Documentation/git-push.txt |    4 ++--
 builtin-push.c             |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index f8cc2b5..fb9dc7f 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects
 
 SYNOPSIS
 --------
-'git-push' [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]
+'git-push' [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]
 
 DESCRIPTION
 -----------
@@ -91,7 +91,7 @@ the remote repository.
 	transfer spends extra cycles to minimize the number of
 	objects to be sent and meant to be used on slower connection.
 
--v::
+-v, \--verbose::
 	Run verbosely.
 
 include::urls.txt[]
diff --git a/builtin-push.c b/builtin-push.c
index cb78401..613f6c2 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -8,7 +8,7 @@
 
 #define MAX_URI (16)
 
-static const char push_usage[] = "git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]";
+static const char push_usage[] = "git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]";
 
 static int all, tags, force, thin = 1, verbose;
 static const char *receivepack;
@@ -372,7 +372,8 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 			i++;
 			break;
 		}
-		if (!strcmp(arg, "-v")) {
+		if (!strcmp(arg, "-v") ||
+                    !strcmp(arg, "--verbose")) {
 			verbose=1;
 			continue;
 		}
-- 
1.5.3.rc5

```

## Junio C Hamano, 2007-08-27 08:14

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <7vtzqll7hf.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtzqll7hf.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <y7fxeal4.fsf@cante.net>

```
Why?

```

## Johannes Schindelin, 2007-08-27 08:40

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <Pine.LNX.4.64.0708270940130.28586@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0708270940130.28586%40racer.site
In-Reply-To: <y7fxeal4.fsf@cante.net>

```
Hi,

On Mon, 27 Aug 2007, Jari Aalto wrote:

> Implemented and documented new option.

It is not "new".  It is just a long form for the already existing "-v".

Ciao,
Dscho

```

## David Kågedal, 2007-08-27 08:51

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <878x7xjr7b.fsf@morpheus.local>
URL: https://gitlist.dev/e/878x7xjr7b.fsf%40morpheus.local
In-Reply-To: <7vtzqll7hf.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> writes:

> Why?

One reason is that I often don't know if the program I want to run
(git or something sles) uses -v as the "verbose" flag, or if it's the
"version" flag or something else.  But if there is a --verbose flag, I
can be sure what it is, so I often try that first if I'm unsure.  If
that faild, I'll probably look in the man page.

-- 
David Kågedal

```

## Jari Aalto, 2007-08-27 13:30

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <ps19drzl.fsf@cante.net>
URL: https://gitlist.dev/e/ps19drzl.fsf%40cante.net
In-Reply-To: <Pine.LNX.4.64.0708270940130.28586@racer.site>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi,
>
> On Mon, 27 Aug 2007, Jari Aalto wrote:
>
>> Implemented and documented new option.
>
> It is not "new".  It is just a long form for the already existing "-v".

Perception is in the eye. "new long option"
                               ===========

Jari

```

## Jari Aalto, 2007-08-27 13:32

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <lkbxdrwg.fsf@cante.net>
URL: https://gitlist.dev/e/lkbxdrwg.fsf%40cante.net
In-Reply-To: <7vtzqll7hf.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> writes:

> Why?

It complements the command set. -v was the only lonely that did not
have long option choice.

Overall, the option handling in every command could use aboot to
provide both short and long options. Now various commands have short
ones, but no long ones, or vice versa. It's like sherwood there.

Let's start unifying.
Jari

```

## Johannes Schindelin, 2007-08-27 13:45

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <Pine.LNX.4.64.0708271443300.28586@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0708271443300.28586%40racer.site
In-Reply-To: <ps19drzl.fsf@cante.net>

```
Hi,

[please, if you reply to my message, do not kill me from the address list]

On Mon, 27 Aug 2007, Jari Aalto wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Mon, 27 Aug 2007, Jari Aalto wrote:
> >
> >> Implemented and documented new option.
> >
> > It is not "new".  It is just a long form for the already existing "-v".
> 
> Perception is in the eye. "new long option"
>                                ===========

More appropriate: "Add long option --verbose".

Even as a long option, it is not new.  There have been plenty "--verbose"s 
in git before.

It might appear to you as a minor nit, but reading commit logs it is 
pretty disruptive to read about the "new" option and wondering "why the 
heck was it not there before?  Ah, it was.  The committer just added the 
long version of the option".

Ciao,
Dscho

```

## Johannes Schindelin, 2007-08-27 13:48

Subject: Re: [PATCH] builtin-push: New long option --verbose
Message-ID: <Pine.LNX.4.64.0708271447120.28586@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0708271447120.28586%40racer.site
In-Reply-To: <lkbxdrwg.fsf@cante.net>

```
Hi,

On Mon, 27 Aug 2007, Jari Aalto wrote:

> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Why?
> 
> It complements the command set. -v was the only lonely that did not
> have long option choice.

Of course, the _proper_ solution would be to introduce a complete option 
parser component a la getopt.  For me, it is not _half_ as annoying that 
some short/long options are missing than being unable to abbreviate the 
short options into something like "-nls".

Ciao,
Dscho

```
