# [PATCH] git-submodule: Make update verbose for up to date path

5 messages from 2008-03-04 to 2008-03-04. Participants: Ping Yin, Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/12496

## Ping Yin, 2008-03-04 14:58

Subject: [PATCH] git-submodule: Make update verbose for up to date path
Message-ID: <1204642691-3220-1-git-send-email-pkufranky@gmail.com>
URL: https://gitlist.dev/e/1204642691-3220-1-git-send-email-pkufranky%40gmail.com

```
When 'git submodule update' runs for multiple modules, give 'up to date'
info for up to date modules should be a good idea to show the progress.
---
 git-submodule.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 67d3224..94e3db7 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -305,6 +305,8 @@ cmd_update()
 			die "Unable to checkout '$sha1' in submodule path '$path'"
 
 			say "Submodule path '$path': checked out '$sha1'"
+		else
+			say "Up to date: $path"
 		fi
 	done
 }
-- 
1.5.4.3.347.g5314c


```

## Johannes Schindelin, 2008-03-04 15:04

Subject: Re: [PATCH] git-submodule: Make update verbose for up to date path
Message-ID: <alpine.LSU.1.00.0803041503360.22527@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803041503360.22527%40racer.site
In-Reply-To: <1204642691-3220-1-git-send-email-pkufranky@gmail.com>

```
Hi,

On Tue, 4 Mar 2008, Ping Yin wrote:

> When 'git submodule update' runs for multiple modules, give 'up to date'
> info for up to date modules should be a good idea to show the progress.

Does this not go contrary to our efforts to make Git less chatty?  See 
e.g. the output of push and fetch...

Ciao,
Dscho

```

## Ping Yin, 2008-03-04 16:03

Subject: Re: [PATCH] git-submodule: Make update verbose for up to date path
Message-ID: <46dff0320803040803v2f93d749t6b45fc8e47e66d21@mail.gmail.com>
URL: https://gitlist.dev/e/46dff0320803040803v2f93d749t6b45fc8e47e66d21%40mail.gmail.com
In-Reply-To: <alpine.LSU.1.00.0803041503360.22527@racer.site>

```
On Tue, Mar 4, 2008 at 11:04 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
>
>  On Tue, 4 Mar 2008, Ping Yin wrote:
>
>  > When 'git submodule update' runs for multiple modules, give 'up to date'
>  > info for up to date modules should be a good idea to show the progress.
>
>  Does this not go contrary to our efforts to make Git less chatty?  See
>  e.g. the output of push and fetch...
>
When i run 'git submodule update' in a repository whose submodules are
all clean, there is not any output which makes me not know whether
this command are successful. I think this is not friendly.
>  Ciao,
>  Dscho
>



-- 
Ping Yin

```

## Johannes Schindelin, 2008-03-04 16:08

Subject: Re: [PATCH] git-submodule: Make update verbose for up to date path
Message-ID: <alpine.LSU.1.00.0803041605450.22527@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803041605450.22527%40racer.site
In-Reply-To: <46dff0320803040803v2f93d749t6b45fc8e47e66d21@mail.gmail.com>

```
Hi,

On Wed, 5 Mar 2008, Ping Yin wrote:

> When i run 'git submodule update' in a repository whose submodules are 
> all clean, there is not any output which makes me not know whether this 
> command are successful. I think this is not friendly.

The problem is: people ignore output.  Back when merge-recursive was even 
more chatty than it is now, they happily glanced over the fact that there 
were _conflicts_.

So we reduced the output.  Drastically.

For example, git reset --hard (amongst others) does not output a _thing_ 
if it succeeds.  This is good.  No output means it succeeded.

Now, some other commands take a while to complete, so we have a progress 
which kicks in after a second or so.  Still, this is just to keep the user 
busy when she would otherwise think that Git hangs.

So no, I do not like submodule becoming chattier.  You can add --verbose 
if you want, but the default should be _quiet_.

Ciao,
Dscho


```

## Junio C Hamano, 2008-03-04 20:31

Subject: Re: [PATCH] git-submodule: Make update verbose for up to date path
Message-ID: <7v7igi5j08.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7igi5j08.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <46dff0320803040803v2f93d749t6b45fc8e47e66d21@mail.gmail.com>

```
"Ping Yin" <pkufranky@gmail.com> writes:

> When i run 'git submodule update' in a repository whose submodules are
> all clean, there is not any output which makes me not know whether
> this command are successful. I think this is not friendly.

Not at all.  If you are unsuccessful and did not issue an error message,
you have a bug to fix.

When a command finishes successfully doing what it was asked to do,
especially when it does a lot of things and has potential to issue useful
error messages and warnings to some but not all of them, it should stay
quiet for successful ones unless there is a very good reason not to.  The
reasons may include "the user told it to be chatty with --verbose", "it
may make the user think it hang, because it takes a long time", and
perhaps "it is a rare thing to run and the user may not be familiar with
how it acts".

```
