Calls to cg-diff without filename parameters were dependent on GNU xargs
traits. BSD xargs is hardcoded to do --no-run-if-empty -- so if the filter
is effectively empty we avoid calling xargs.
Signed-off-by: Martin Langhoff <[EMAIL PROTECTED]>
---
cg-diff | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
7b1d159f557ee06a0358217cdc29c2a2b2ee52fc
diff --git a/cg-diff b/cg-diff
--- a/cg-diff
+++ b/cg-diff
@@ -155,7 +155,11 @@ if [ "$id2" = " " ]; then
# FIXME: Update ret based on what did we match. And take "$@"
# to account after all.
ret=
- cat $filter | xargs git-diff-cache -r -p $tree | colorize | pager
+ if [ -s $filter ]; then
+ cat $filter | xargs git-diff-cache -r -p $tree | colorize |
pager
+ else
+ git-diff-cache -r -p $tree | colorize | pager
+ fi
rm $filter
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html