All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git-submodule should obey --quiet for subcommands
@ 2009-09-21 16:46 Jonathan del Strother
  2009-09-23 21:33 ` Jonathan del Strother
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan del Strother @ 2009-09-21 16:46 UTC (permalink / raw)
  To: Git Mailing List

Make sure that --quiet is passed through to git-clone & git-fetch.

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
---
clone & fetch are extremely noisy - perhaps something like the following?

 git-submodule.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index bfbd36b..1e1066e 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -106,9 +106,9 @@ module_clone()

 	if test -n "$reference"
 	then
-		git-clone "$reference" -n "$url" "$path"
+		git-clone ${GIT_QUIET:+-q} "$reference" -n "$url" "$path"
 	else
-		git-clone -n "$url" "$path"
+		git-clone ${GIT_QUIET:+-q} -n "$url" "$path"
 	fi ||
 	die "Clone of '$url' into submodule path '$path' failed"
 }
@@ -450,7 +450,7 @@ cmd_update()
 			if test -z "$nofetch"
 			then
 				(unset GIT_DIR; cd "$path" &&
-					git-fetch) ||
+					git-fetch ${GIT_QUIET:+-q}) ||
 				die "Unable to fetch in submodule path '$path'"
 			fi

-- 
1.6.5.rc1.44.ga1675.dirty

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-submodule should obey --quiet for subcommands
  2009-09-21 16:46 [PATCH] git-submodule should obey --quiet for subcommands Jonathan del Strother
@ 2009-09-23 21:33 ` Jonathan del Strother
  2009-09-24  5:31   ` Nanako Shiraishi
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan del Strother @ 2009-09-23 21:33 UTC (permalink / raw)
  To: Git Mailing List

On Mon, Sep 21, 2009 at 5:46 PM, Jonathan del Strother
<maillist@steelskies.com> wrote:
> Make sure that --quiet is passed through to git-clone & git-fetch.
>
> Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
> ---
> clone & fetch are extremely noisy - perhaps something like the following?
>
>  git-submodule.sh |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/git-submodule.sh b/git-submodule.sh
> index bfbd36b..1e1066e 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -106,9 +106,9 @@ module_clone()
>
>        if test -n "$reference"
>        then
> -               git-clone "$reference" -n "$url" "$path"
> +               git-clone ${GIT_QUIET:+-q} "$reference" -n "$url" "$path"
>        else
> -               git-clone -n "$url" "$path"
> +               git-clone ${GIT_QUIET:+-q} -n "$url" "$path"
>        fi ||
>        die "Clone of '$url' into submodule path '$path' failed"
>  }
> @@ -450,7 +450,7 @@ cmd_update()
>                        if test -z "$nofetch"
>                        then
>                                (unset GIT_DIR; cd "$path" &&
> -                                       git-fetch) ||
> +                                       git-fetch ${GIT_QUIET:+-q}) ||
>                                die "Unable to fetch in submodule path '$path'"
>                        fi
>
> --
> 1.6.5.rc1.44.ga1675.dirty
>


No takers?  Perhaps I should explain my interest in this patch : we
use Capistrano to deploy our Rails app which contains a bunch of
submodules.  It's done over ssh, so the 'git submodule update' step
during deployment spews something along the lines of :

Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s
Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s
Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s
....
..
.

all the way up to 100% to the console.  Currently we're just directing
stdout to /dev/null, since --quiet failed to accomplish much, but it
seems like something along the lines of this patch would be useful.

Unless someone has a better implementation...?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-submodule should obey --quiet for subcommands
  2009-09-23 21:33 ` Jonathan del Strother
@ 2009-09-24  5:31   ` Nanako Shiraishi
  2009-09-24  7:34     ` Jonathan del Strother
  0 siblings, 1 reply; 5+ messages in thread
From: Nanako Shiraishi @ 2009-09-24  5:31 UTC (permalink / raw)
  To: Jonathan del Strother; +Cc: Git Mailing List

Quoting Jonathan del Strother <maillist@steelskies.com>

> No takers?  Perhaps I should explain my interest in this patch : we
> use Capistrano to deploy our Rails app which contains a bunch of
> submodules.  It's done over ssh, so the 'git submodule update' step
> during deployment spews something along the lines of :
>
> Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s
> Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s
> Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s
> ....
> ..

Does 'git clone' itself do that to you, too, or do you see these output on separate lines only when running 'git submodule clone'? I never used 'git submodule clone' but with 'git clone' these lines seem to overwrite one after another and they never bothered me. Could your terminal emulator be broken?

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-submodule should obey --quiet for subcommands
  2009-09-24  5:31   ` Nanako Shiraishi
@ 2009-09-24  7:34     ` Jonathan del Strother
  2009-09-24  9:15       ` Jonathan del Strother
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan del Strother @ 2009-09-24  7:34 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: Git Mailing List

On Thu, Sep 24, 2009 at 6:31 AM, Nanako Shiraishi <nanako3@lavabit.com> wrote:
> Quoting Jonathan del Strother <maillist@steelskies.com>
>
>> No takers?  Perhaps I should explain my interest in this patch : we
>> use Capistrano to deploy our Rails app which contains a bunch of
>> submodules.  It's done over ssh, so the 'git submodule update' step
>> during deployment spews something along the lines of :
>>
>> Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s
>> Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s
>> Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s
>> ....
>> ..
>
> Does 'git clone' itself do that to you, too, or do you see these output on separate lines only when running 'git submodule clone'? I never used 'git submodule clone' but with 'git clone' these lines seem to overwrite one after another and they never bothered me. Could your terminal emulator be broken?
>

No, git clone has the same problem when run under Capistrano, but it
obeys --quiet.

That said, I always assumed that, say, 'ssh -t myhost git clone foo'
would have the same problem (ie printing each progress update on a new
line), but I see it works correctly.  Looks like Capistrano is eating
the \r somewhere.  I still think my patch is valid, but I'll
investigate into Capistrano some more & see if I can fix it there.

Jonathan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-submodule should obey --quiet for subcommands
  2009-09-24  7:34     ` Jonathan del Strother
@ 2009-09-24  9:15       ` Jonathan del Strother
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan del Strother @ 2009-09-24  9:15 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: Git Mailing List

On Thu, Sep 24, 2009 at 8:34 AM, Jonathan del Strother
<maillist@steelskies.com> wrote:
> On Thu, Sep 24, 2009 at 6:31 AM, Nanako Shiraishi <nanako3@lavabit.com> wrote:
>> Quoting Jonathan del Strother <maillist@steelskies.com>
>>
>>> No takers?  Perhaps I should explain my interest in this patch : we
>>> use Capistrano to deploy our Rails app which contains a bunch of
>>> submodules.  It's done over ssh, so the 'git submodule update' step
>>> during deployment spews something along the lines of :
>>>
>>> Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s
>>> Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s
>>> Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s
>>> ....
>>> ..
>>
>> Does 'git clone' itself do that to you, too, or do you see these output on separate lines only when running 'git submodule clone'? I never used 'git submodule clone' but with 'git clone' these lines seem to overwrite one after another and they never bothered me. Could your terminal emulator be broken?
>>
>
> No, git clone has the same problem when run under Capistrano, but it
> obeys --quiet.
>
> That said, I always assumed that, say, 'ssh -t myhost git clone foo'
> would have the same problem (ie printing each progress update on a new
> line), but I see it works correctly.  Looks like Capistrano is eating
> the \r somewhere.  I still think my patch is valid, but I'll
> investigate into Capistrano some more & see if I can fix it there.
>
> Jonathan
>

... thinking about it, it's obvious why Capistrano doesn't handle the
\r properly - it's running commands in parallel on multiple machines,
and echoing any output from the commands (prefixed with the machine
name) back to the user in realtime.  So it would be kinda tricky for
\r to work as expected there.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-24  9:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21 16:46 [PATCH] git-submodule should obey --quiet for subcommands Jonathan del Strother
2009-09-23 21:33 ` Jonathan del Strother
2009-09-24  5:31   ` Nanako Shiraishi
2009-09-24  7:34     ` Jonathan del Strother
2009-09-24  9:15       ` Jonathan del Strother

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.