g |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5448ad57032df1113daf1c3899741febc069d8b3
Author:     Arnaud VERSINI <arnaud.vers...@libreoffice.org>
AuthorDate: Sun Jan 2 17:33:27 2022 +0100
Commit:     Arnaud Versini <arnaud.vers...@libreoffice.org>
CommitDate: Sat Jan 15 15:42:34 2022 +0100

    Allow g to run git gc command
    
    Change-Id: Ibca338cbd99839b20a2373075a2e544e7ab638e1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127870
    Tested-by: Jenkins
    Reviewed-by: Arnaud Versini <arnaud.vers...@libreoffice.org>

diff --git a/g b/g
index 8b733fc878c6..021ad6c41cde 100755
--- a/g
+++ b/g
@@ -24,7 +24,7 @@ usage()
 {
     git
     echo
-    echo "Usage: g [options] [git (checkout|clone|fetch|grep|pull|push|reset) 
[git options/args..]]"
+    echo "Usage: g [options] [git 
(checkout|clone|fetch|gc|grep|pull|push|reset) [git options/args..]]"
     echo ""
     echo " -z restore the git hooks and do other sanity checks"
 }
@@ -362,6 +362,9 @@ case "$COMMAND" in
         (git fetch "$@" && git submodule foreach git fetch "$@" ) && git 
submodule update --progress
 
         ;;
+    gc)
+         (git gc "$@" && git submodule foreach git gc "$@" )
+        ;;
     grep)
         KEEP_GOING="||:"
         do_git_cmd "${COMMAND}" "$@"

Reply via email to