Skip to contentSkip to conversation

Fix cg-status with recent git versions

PATCH In review Pavel Roskin 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix cg-status with recent git versions

From: Pavel Roskin <[email protected]>

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.

---

 cg-status |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cg-status +1 -1
index d11762e..0529ba2 100755
@@ -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=!
#1 lore raw
Quoted 5 lines · Pavel Roskin

From: Pavel Roskin <[email protected]>

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