Re: [PATCH] git-submodule should obey --quiet for subcommands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 21, 2009 at 5:46 PM, Jonathan del Strother
<maillist@xxxxxxxxxxxxxx> wrote:
> Make sure that --quiet is passed through to git-clone & git-fetch.
>
> Signed-off-by: Jonathan del Strother <jon.delStrother@xxxxxxxxxxxxx>
> ---
> 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...?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]