Git development
 help / color / mirror / Atom feed
* [PATCH] Fix cg-status with recent git versions
@ 2006-04-27 22:38 Pavel Roskin
  2006-04-27 23:46 ` Nicolas Vilz
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Roskin @ 2006-04-27 22:38 UTC (permalink / raw)
  To: Petr Baudis, git

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=!

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-27 23:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27 22:38 [PATCH] Fix cg-status with recent git versions Pavel Roskin
2006-04-27 23:46 ` Nicolas Vilz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox