Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


git grep -l is useless when the == are there because it no longer is a plain list of filenames. I 
needed it for sed, so I patched it.

ciao,
    Christian
From aa8fcad2fafbfde9bb7294375be1bbcc4ab28f50 Mon Sep 17 00:00:00 2001
From: Christian Dywan <christian.dywan@lanedo.com>
Date: Fri, 6 May 2011 14:25:38 +0200
Subject: [PATCH] Don't print === decoration when running g grep

Otherwise g grep -l can't be used, for example with sed.
---
 g |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/g b/g
index 2d601b5..9cec2a6 100755
--- a/g
+++ b/g
@@ -239,7 +239,7 @@ for REPO in $DIRS ; do
 
             # do it!
            if [ "$COMMAND" != "clone" -o ! -d $DIR ] ; then
-                [ "$REPORT_REPOS" = "1" ] && echo "===== $NAME ====="
+                [ "$REPORT_REPOS" = "1" -a "$COMMAND" != "grep" ] && echo "===== $NAME ====="
                 git $PAGER "$COMMAND" $EXTRA "${FILES[@]}"
                 RETURN=$?
            fi
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.