Re: [PATCH 09/20] git-rebase--interactive.sh: avoid test cond -a/-o cond

2014-06-10 Thread David Aguilar
On Fri, Jun 06, 2014 at 07:55:52AM -0700, Elia Pinto wrote:
 The construct is error-prone; test being built-in in most modern
 shells, the reason to avoid test cond  test cond spawning
 one extra process by using a single test cond -a cond no
 longer exists.
 
 Signed-off-by: Elia Pinto gitter.spi...@gmail.com
 ---
  git-rebase--interactive.sh |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
 index 6ec9d3c..797571f 100644
 --- a/git-rebase--interactive.sh
 +++ b/git-rebase--interactive.sh
 @@ -1013,7 +1013,7 @@ then
   git rev-list $revisions |
   while read rev
   do
 - if test -f $rewritten/$rev -a $(sane_grep $rev 
 $state_dir/not-cherry-picks) = 
 + if test -f $rewritten/$rev  test $(sane_grep $rev 
 $state_dir/not-cherry-picks) = 
   then

This line is getting pretty long.
I wonder whether it should be wrapped at the  to keep it shorter?

Also, it looks like the last half of the expression can be simplified to,

test -z $(sane_grep $rev $state_dir/not-cherry-picks)

rather than comparing against .
-- 
David
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/20] git-rebase--interactive.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern
shells, the reason to avoid test cond  test cond spawning
one extra process by using a single test cond -a cond no
longer exists.

Signed-off-by: Elia Pinto gitter.spi...@gmail.com
---
 git-rebase--interactive.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 6ec9d3c..797571f 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -1013,7 +1013,7 @@ then
git rev-list $revisions |
while read rev
do
-   if test -f $rewritten/$rev -a $(sane_grep $rev 
$state_dir/not-cherry-picks) = 
+   if test -f $rewritten/$rev  test $(sane_grep $rev 
$state_dir/not-cherry-picks) = 
then
# Use -f2 because if rev-list is telling us this commit 
is
# not worthwhile, we don't want to track its multiple 
heads,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html