[Qemu-devel] [PATCH] scripts: don't throw away stderr when checking out git submodules

Daniel P. Berrange posted 1 patch 8 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171020130748.22983-1-berrange@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
scripts/git-submodule.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] scripts: don't throw away stderr when checking out git submodules
Posted by Daniel P. Berrange 8 years ago
The stderr from git is important if git fails to checkout modules
due to network problems, or other unexpected errors.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 scripts/git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index d8fbc7e47e..08932a35f0 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -32,7 +32,7 @@ status)
     exit $?
     ;;
 update)
-    git submodule update --init $modules 1>/dev/null 2>&1
+    git submodule update --init $modules 1>/dev/null
     git submodule status $modules > "${substat}"
     ;;
 esac
-- 
2.13.6


Re: [Qemu-devel] [PATCH] scripts: don't throw away stderr when checking out git submodules
Posted by Peter Maydell 8 years ago
On 20 October 2017 at 14:07, Daniel P. Berrange <berrange@redhat.com> wrote:
> The stderr from git is important if git fails to checkout modules
> due to network problems, or other unexpected errors.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  scripts/git-submodule.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
> index d8fbc7e47e..08932a35f0 100755
> --- a/scripts/git-submodule.sh
> +++ b/scripts/git-submodule.sh
> @@ -32,7 +32,7 @@ status)
>      exit $?
>      ;;
>  update)
> -    git submodule update --init $modules 1>/dev/null 2>&1
> +    git submodule update --init $modules 1>/dev/null
>      git submodule status $modules > "${substat}"
>      ;;

Is there a reason why we say "1>/dev/null" rather than just ">/dev/null" ?

thanks
-- PMM

Re: [Qemu-devel] [PATCH] scripts: don't throw away stderr when checking out git submodules
Posted by Daniel P. Berrange 8 years ago
On Fri, Oct 20, 2017 at 02:13:58PM +0100, Peter Maydell wrote:
> On 20 October 2017 at 14:07, Daniel P. Berrange <berrange@redhat.com> wrote:
> > The stderr from git is important if git fails to checkout modules
> > due to network problems, or other unexpected errors.
> >
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
> >  scripts/git-submodule.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
> > index d8fbc7e47e..08932a35f0 100755
> > --- a/scripts/git-submodule.sh
> > +++ b/scripts/git-submodule.sh
> > @@ -32,7 +32,7 @@ status)
> >      exit $?
> >      ;;
> >  update)
> > -    git submodule update --init $modules 1>/dev/null 2>&1
> > +    git submodule update --init $modules 1>/dev/null
> >      git submodule status $modules > "${substat}"
> >      ;;
> 
> Is there a reason why we say "1>/dev/null" rather than just ">/dev/null" ?

No special reason other than that was clearer when we had both 1> and 2>
at the same time. I can change it if you prefer ?

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH] scripts: don't throw away stderr when checking out git submodules
Posted by Peter Maydell 8 years ago
On 20 October 2017 at 14:17, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Fri, Oct 20, 2017 at 02:13:58PM +0100, Peter Maydell wrote:
>> On 20 October 2017 at 14:07, Daniel P. Berrange <berrange@redhat.com> wrote:
>> > The stderr from git is important if git fails to checkout modules
>> > due to network problems, or other unexpected errors.
>> >
>> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>> > ---
>> >  scripts/git-submodule.sh | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
>> > index d8fbc7e47e..08932a35f0 100755
>> > --- a/scripts/git-submodule.sh
>> > +++ b/scripts/git-submodule.sh
>> > @@ -32,7 +32,7 @@ status)
>> >      exit $?
>> >      ;;
>> >  update)
>> > -    git submodule update --init $modules 1>/dev/null 2>&1
>> > +    git submodule update --init $modules 1>/dev/null
>> >      git submodule status $modules > "${substat}"
>> >      ;;
>>
>> Is there a reason why we say "1>/dev/null" rather than just ">/dev/null" ?
>
> No special reason other than that was clearer when we had both 1> and 2>
> at the same time. I can change it if you prefer ?

I guess I don't care enough to get you to reroll the patch :-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM