Skip to contentSkip to conversation

cg-status: fix detection of dissappeared files

PATCH New Jonas Fonseca 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cg-status: fix detection of dissappeared files

fatal: ambiguous argument 'manual.txt': unknown revision or path not in the working tree. Use '--' to separate paths from revisions

---

cg-status +1 -1
index e2f97dd..aee5ff0 100755
@@ -239,7 +239,7 @@ if [ "$workstatus" ]; then
 		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=!
+				[ "$(git-diff-files -- "$file")" ] && mode=!
 			elif [ "$mode" = M ] && [ "$commitignore" ]; then
 				fgrep -qx "$file" "$_git/commit-ignore" && mode=m
 			fi
Signature · 1 line
Jonas Fonseca