threads / patch / 3979

patchFix cg-status with recent git versions

Subject: [PATCH] Fix cg-status with recent git versions

## tl;dr

2 messages between Apr 27, 2006 and Apr 27, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Pavel Roskin· Apr 27, 2006, 22:38 UTC · lore
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(-)
Show changes to cg-status +1 −1
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=!
Nicolas Vilz· Apr 27, 2006, 23:46 UTC · re: Pavel Roskin · lore

Re: [PATCH] Fix cg-status with recent git versions

On Thu, Apr 27, 2006 at 06:38:26PM -0400, Pavel Roskin wrote:
Show 5 quoted lines
> 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.

Thank you very much for recognizing... i was tempted to report that bug... but was not sure if it is fixed yet...

Sincerly Nicolas

← back to recent threads