[Libreoffice-commits] core.git: g

Kevin Suo (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 12 08:55:39 UTC 2021


 g |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 508ccbdb14ecdebf1aee2110e91f83768ab387f0
Author:     Kevin Suo <suokunlong at 126.com>
AuthorDate: Sat Jun 26 17:42:52 2021 +0800
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 12 10:55:05 2021 +0200

    Add "--progress" agument to the ./g command
    
    Newer version of git has a --progress option to show the progress when running "git submodule update". This is useful in our ./g command expecially when we are building the code with l10n languages enabled and the network connection is slow. Without this I do not see where I am for the update process and may think it have died.
    
    Change-Id: I4c9e1e9bccbd8e6ca2ea2b44f5b6d6d90cad1506
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117922
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/g b/g
index 918292eb3ee6..8b733fc878c6 100755
--- a/g
+++ b/g
@@ -222,7 +222,7 @@ do_checkout()
         fi
     done
     if [ -f .gitmodules ] ; then
-        git submodule update
+        git submodule update --progress
         if [ -n "$branch" ] ; then
             git submodule foreach git checkout -b "${branch}" HEAD || return $?
         fi
@@ -243,7 +243,7 @@ do_reset()
 {
     git reset "$@" || return $?
     if [ -f .gitmodules ] ; then
-        git submodule update || return $?
+        git submodule update --progress || return $?
     else
         # now that is the nasty case we moved prior to submodules
         # delete the submodules left over if any
@@ -277,9 +277,9 @@ do_init_modules()
     done
     for module in $SUBMODULES_CONFIGURED ; do
         if [ -n "$REFERENCED_GIT" ] ; then
-            git submodule update --reference "$REFERENCED_GIT/.git/modules/$module" "$module" || return $?
+            git submodule update --reference "$REFERENCED_GIT/.git/modules/$module" --progress "$module" || return $?
         else
-            git submodule update "$module" || return $?
+            git submodule update --progress "$module" || return $?
         fi
     done
     return 0
@@ -359,7 +359,7 @@ case "$COMMAND" in
         do_init_modules && refresh_all_hooks
         ;;
     fetch)
-        (git fetch "$@" && git submodule foreach git fetch "$@" ) && git submodule update
+        (git fetch "$@" && git submodule foreach git fetch "$@" ) && git submodule update --progress
 
         ;;
     grep)
@@ -367,7 +367,7 @@ case "$COMMAND" in
         do_git_cmd "${COMMAND}" "$@"
         ;;
     pull)
-        git pull "$@" && git submodule update && refresh_all_hooks
+        git pull "$@" && git submodule update --progress && refresh_all_hooks
         ;;
     push)
         git submodule foreach git push "$@"


More information about the Libreoffice-commits mailing list