All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: check if .git exists before checking submodule status
@ 2022-06-29 16:08 Daniel P. Berrangé
  2022-07-01  1:39 ` Richard Henderson
  2022-07-06 21:13 ` Philippe Mathieu-Daudé via
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2022-06-29 16:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P. Berrangé

Currently we check status of each submodule, before actually checking
if we're in a git repo. These status commands will all fail, but we
are hiding their output so we don't see it currently.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 scripts/git-submodule.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index e225d3a963..7be41f5948 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -51,6 +51,12 @@ validate_error() {
     exit 1
 }
 
+if test -n "$maybe_modules" && ! test -e ".git"
+then
+    echo "$0: unexpectedly called with submodules but no git checkout exists"
+    exit 1
+fi
+
 modules=""
 for m in $maybe_modules
 do
@@ -63,12 +69,6 @@ do
     fi
 done
 
-if test -n "$maybe_modules" && ! test -e ".git"
-then
-    echo "$0: unexpectedly called with submodules but no git checkout exists"
-    exit 1
-fi
-
 case "$command" in
 status|validate)
     if test -z "$maybe_modules"
-- 
2.36.1



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

* Re: [PATCH] scripts: check if .git exists before checking submodule status
  2022-06-29 16:08 [PATCH] scripts: check if .git exists before checking submodule status Daniel P. Berrangé
@ 2022-07-01  1:39 ` Richard Henderson
  2022-07-06 21:13 ` Philippe Mathieu-Daudé via
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2022-07-01  1:39 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel

On 6/29/22 21:38, Daniel P. Berrangé wrote:
> Currently we check status of each submodule, before actually checking
> if we're in a git repo. These status commands will all fail, but we
> are hiding their output so we don't see it currently.
> 
> Signed-off-by: Daniel P. Berrangé<berrange@redhat.com>
> ---
>   scripts/git-submodule.sh | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH] scripts: check if .git exists before checking submodule status
  2022-06-29 16:08 [PATCH] scripts: check if .git exists before checking submodule status Daniel P. Berrangé
  2022-07-01  1:39 ` Richard Henderson
@ 2022-07-06 21:13 ` Philippe Mathieu-Daudé via
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-06 21:13 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel

On 29/6/22 18:08, Daniel P. Berrangé wrote:
> Currently we check status of each submodule, before actually checking
> if we're in a git repo. These status commands will all fail, but we
> are hiding their output so we don't see it currently.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   scripts/git-submodule.sh | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


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

end of thread, other threads:[~2022-07-06 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 16:08 [PATCH] scripts: check if .git exists before checking submodule status Daniel P. Berrangé
2022-07-01  1:39 ` Richard Henderson
2022-07-06 21:13 ` Philippe Mathieu-Daudé via

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.