[PATCH] cg-commit: prefix pathspec argument with --
Make cg-commit handle files beginning with dashes.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
[ Obviously depends on the patch I sent previously. ]
cg-commit | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cg-commit b/cg-commit
--- a/cg-commit
+++ b/cg-commit
@@ -110,7 +110,7 @@ if [ "$1" ]; then
[ "$ignorecache" ] && die "-C and listing files to commit does not make sense"
[ -s $_git/merging ] && die "cannot commit individual files when merging"
- eval commitfiles=($(git-diff-cache -r -m HEAD "$@" | \
+ eval commitfiles=($(git-diff-cache -r -m HEAD -- "$@" | \
sed 's/^\([^ ]*\)\(. .*\)\( .*\)*$/"\2"/'))
customfiles=1
--
Jonas Fonseca