From: Pierre Habouzit <madcoder@debian.org>
To: Josef Jeff Sipek <jsipek@cs.sunysb.edu>
Cc: git@vger.kernel.org, Pierre Habouzit <madcoder@debian.org>
Subject: [PATCH] guilt-status(1): Remove bashisms.
Date: Thu, 14 Jun 2007 14:51:01 +0200 [thread overview]
Message-ID: <11818254624139-git-send-email-madcoder@debian.org> (raw)
In-Reply-To: <11818254621527-git-send-email-madcoder@debian.org>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
guilt-status | 58 ++++++++++++++++++++++++++++------------------------------
1 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/guilt-status b/guilt-status
index 934ea53..bc2f33e 100755
--- a/guilt-status
+++ b/guilt-status
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright (c) Josef "Jeff" Sipek, 2006, 2007
#
USAGE="[-a|-A] [-c|-C] [-d|-D] [-m|-M] [-r|-R] [-t|-T] [-u|-U] [-x|-X] [-n]"
-. guilt
+. `dirname $0`/guilt
untracked=""
DIFF_FILTER=""
@@ -53,7 +53,7 @@ fi
git-rev-parse --verify HEAD >/dev/null 2>&1 || IS_INITIAL=t
-function print_status
+print_status()
{
if [ -z "$no_prefix" ] ; then
Apfx="A "
@@ -81,34 +81,32 @@ function print_status
done
}
-cd "$TOP_DIR"
-
(
-# untracked; FIXME: there's got to be a better way
-if [ ! -z "$untracked" ]; then
- if [ -f "$GIT_DIR/info/exclude" ]; then
- git-ls-files -z --others \
- --exclude-from="$GIT_DIR/info/exclude" \
- --exclude-per-directory=.gitignore
- else
- git-ls-files -z --others --exclude-per-directory=.gitignore
- fi | xargs -0 -L 1 echo | while read n; do
- [ -z "$n" ] && continue
- echo "$n" | sed -e "s/^/?\t/"
- done
-fi
+ cd "$TOP_DIR"
+ # untracked; FIXME: there's got to be a better way
+ if [ ! -z "$untracked" ]; then
+ if [ -f "$GIT_DIR/info/exclude" ]; then
+ git-ls-files -z --others \
+ --exclude-from="$GIT_DIR/info/exclude" \
+ --exclude-per-directory=.gitignore
+ else
+ git-ls-files -z --others --exclude-per-directory=.gitignore
+ fi | xargs -0 -L 1 echo | while read n; do
+ [ -z "$n" ] && continue
+ echo "$n" | sed -e "s/^/?\t/"
+ done
+ fi
-# added
-if [ -z "$IS_INITIAL" ]; then
- # non-initial commit
- git-diff-index -M --name-status --diff-filter=$DIFF_FILTER HEAD
-else
- # initial commit
- git-ls-files | sed -e "s/^/A\t/"
-fi | sed -e '
- s/\\/\\\\/g
- s/ /\\ /g
-'
+ # added
+ if [ -z "$IS_INITIAL" ]; then
+ # non-initial commit
+ git-diff-index -M --name-status --diff-filter=$DIFF_FILTER HEAD
+ else
+ # initial commit
+ git-ls-files | sed -e "s/^/A\t/"
+ fi | sed -e '
+ s/\\/\\\\/g
+ s/ /\\ /g
+ '
) | print_status
-cd - 2>&1 >/dev/null
--
1.5.2.1
next prev parent reply other threads:[~2007-06-14 12:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 12:50 [PATCH guilt] make guilt use standard POSIX shell Pierre Habouzit
2007-06-14 12:50 ` [PATCH] Regression test suite needs bash, that's OK Pierre Habouzit
2007-06-14 12:50 ` [PATCH] guilt(1): Obvious bashisms fixed Pierre Habouzit
2007-06-14 15:15 ` Josef Sipek
2007-06-14 15:18 ` Pierre Habouzit
2007-06-14 12:50 ` [PATCH] guilt(1): simplifications Pierre Habouzit
2007-06-14 14:58 ` Josef Sipek
2007-06-14 15:16 ` Pierre Habouzit
2007-06-14 12:50 ` [PATCH] guilt(1): reimplement push_patch, using a subshell to avoid locals Pierre Habouzit
2007-06-14 12:51 ` [PATCH] Easy commands, without bashisms Pierre Habouzit
2007-06-14 12:51 ` Pierre Habouzit [this message]
2007-06-14 12:51 ` [PATCH] Remove last bashisms from remaining commands Pierre Habouzit
2007-06-14 13:07 ` [PATCH guilt] make guilt use standard POSIX shell Pierre Habouzit
2007-06-14 13:20 ` [PATCH] Small regresson when series file is empty Pierre Habouzit
2007-06-14 15:27 ` [PATCH guilt] make guilt use standard POSIX shell Josef Sipek
2007-06-14 15:56 ` Pierre Habouzit
2007-06-14 15:58 ` Pierre Habouzit
2007-06-14 16:39 ` Josef Sipek
2007-06-14 17:16 ` Pierre Habouzit
2007-06-14 15:50 ` [PATCH] More regressions fixes Pierre Habouzit
2007-06-15 8:01 ` [PATCH guilt] make guilt use standard POSIX shell Derek Fawcus
2007-06-15 22:31 ` Benjamin Sergeant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11818254624139-git-send-email-madcoder@debian.org \
--to=madcoder@debian.org \
--cc=git@vger.kernel.org \
--cc=jsipek@cs.sunysb.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).