# [PATCH] Don't remove missing files in cg-commit

1 messages from 2005-05-29 to 2005-05-29. Participants: Dan Holmsand.
Thread: https://gitlist.dev/t/760

## Dan Holmsand, 2005-05-29 20:01

Subject: [PATCH] Don't remove missing files in cg-commit
Message-ID: <d7d6ub$c5b$1@sea.gmane.org>
URL: https://gitlist.dev/e/d7d6ub%24c5b%241%40sea.gmane.org

```
cg-commit presently wants to remove missing files, even if they haven't 
been cg-rm'd. This is due to a missing "-m" in the call to git-diff-cache.

Signed-off-by: Dan Holmsand <holmsand@gmail.com>



diff --git a/cg-commit b/cg-commit
--- a/cg-commit
+++ b/cg-commit
@@ -73,7 +73,7 @@ else
 	# be committed along automagically as well.
 
 	if [ ! "$ignorecache" ]; then
-		eval changedfiles=($(git-diff-cache -r HEAD | cut -f 2 | \
+		eval changedfiles=($(git-diff-cache -r -m HEAD | cut -f 2 | \
 			sed -e 's/^/"/' -e 's/$/"/'))
 		commitfiles=($addedfiles $remfiles "${changedfiles[@]}")
 	fi

```
