summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorArnaud VERSINI <arnaud.versini@libreoffice.org>2022-01-02 17:33:27 +0100
committerArnaud Versini <arnaud.versini@libreoffice.org>2022-01-15 15:42:34 +0100
commit5448ad57032df1113daf1c3899741febc069d8b3 (patch)
tree524aec5a19a8316d7f20c59c4b129ba89dd26676 /g
parentf005fe8e463695cb701f343c32777fe4d48159ed (diff)
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.versini@libreoffice.org>
Diffstat (limited to 'g')
-rwxr-xr-xg5
1 files changed, 4 insertions, 1 deletions
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}" "$@"