[Libreoffice] [PATCH] allow ./bin/g grep to operate on all repository even when no match is found on any given one

Norbert Thiebaud nthiebaud at gmail.com
Sat Oct 2 20:18:56 PDT 2010


./bin/g stop after the first repository for which the grep condition
was not verified. this is usually not the desired behavior

diff --git a/bin/g b/bin/g
index 4c3de66..858cc69 100755
--- a/bin/g
+++ b/bin/g
@@ -167,6 +167,11 @@ for DIR in * ; do
                     # git status returns error in some versions, clear that
                     RETURN=0
                     ;;
+                grep)
+                    # git grep return an 'error' if nothing is found
+                   # still we should continue grepping the other repos
+                    RETURN=0
+                    ;;
             esac

             exit $RETURN


More information about the LibreOffice mailing list