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

Subsystems: the rest

DORMANTno replies

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

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

From: Ping Yin <hidden>
Date: 2016-06-15 22:44:20

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

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:20

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

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

From: Ping Yin <hidden>
Date: 2016-06-15 22:44:20

On Tue, Mar 4, 2008 at 11:04 PM, Johannes Schindelin
[off-list ref] 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

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:20

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

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:20

"Ping Yin" [off-list ref] 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".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help