Git development
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Petr Baudis <pasky@suse.cz>, git@vger.kernel.org
Subject: [PATCH] Fix cg-status with recent git versions
Date: Thu, 27 Apr 2006 18:38:26 -0400	[thread overview]
Message-ID: <20060427223826.10772.55883.stgit@dv.roinet.com> (raw)

From: Pavel Roskin <proski@gnu.org>

git-diff-index checks the arguments by lstat(), so an empty string would
fail to be recognized as a file.  Use "--" to separate files from
revisions, and also use "." instead of the empty string.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 cg-status |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cg-status b/cg-status
index d11762e..0529ba2 100755
--- a/cg-status
+++ b/cg-status
@@ -233,7 +233,7 @@ if [ "$workstatus" ]; then
 		commitignore=
 		[ -s "$_git/commit-ignore" ] && commitignore=1
 
-		git-diff-index HEAD "$basepath" | cut -f5- -d' ' | 
+		git-diff-index HEAD -- "${basepath:-.}" | cut -f5- -d' ' | 
 		while IFS=$'\t' read -r mode file; do
 			if [ "$mode" = D ]; then
 				[ "$(git-diff-files "$file")" ] && mode=!

             reply	other threads:[~2006-04-27 22:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-27 22:38 Pavel Roskin [this message]
2006-04-27 23:46 ` [PATCH] Fix cg-status with recent git versions Nicolas Vilz

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=20060427223826.10772.55883.stgit@dv.roinet.com \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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