Skip to contentSkip to conversation

scripts: don't throw away stderr when checking out git submodules

PATCH In review Daniel P. Berrange 2 participants 4 messages Oct 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: don't throw away stderr when checking out git submodules

The stderr from git is important if git fails to checkout modules due to network problems, or other unexpected errors.

---
 scripts/git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/git-submodule.sh +1 -1
index d8fbc7e47e..08932a35f0 100755
@@ -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
Signature · 1 line
2.13.6
#1 lore raw
Quoted 13 lines · Daniel P. Berrange

The stderr from git is important if git fails to checkout modules due to network problems, or other unexpected errors.

---
 scripts/git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/git-submodule.sh +0 -0
index d8fbc7e47e..08932a35f0 100755

scripts/git-submodule.sh status) · line 37

Quoted 7 lines
scripts/git-submodule.sh +1 -1
@@ -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

#2 lore raw
Quoted 9 lines · Peter Maydell
Quoted 8 lines · Daniel P. Berrange

The stderr from git is important if git fails to checkout modules due to network problems, or other unexpected errors.

---
 scripts/git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

scripts/git-submodule.sh status) · line 37

Quoted 12 lines
scripts/git-submodule.sh +1 -1
index d8fbc7e47e..08932a35f0 100755
@@ -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

Signature · 3 lines
|: 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 :|
Reviewed-by
#3 lore raw
Quoted 25 lines · Daniel P. Berrange
Quoted 9 lines · Peter Maydell
Quoted 8 lines · Daniel P. Berrange

The stderr from git is important if git fails to checkout modules due to network problems, or other unexpected errors.

---
 scripts/git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

scripts/git-submodule.sh status) · line 37

Quoted 12 lines
scripts/git-submodule.sh +1 -1
index d8fbc7e47e..08932a35f0 100755
@@ -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" ?

Quoted 2 lines

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 :-)

thanks
-- PMM