git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cg-commit: prefix pathspec argument with --

From
Jonas Fonseca <fonseca@diku.dk>
Date
Jun 6, 2005, 21:32 UTC
Message-ID
<20050606213252.GB3498@diku.dk>
In-Reply-To
<20050606212700.GA3498@diku.dk>
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
Previous: Jonas FonsecaNext: Petr Baudis
Message 2 of 6 in “git-diff-cache: handle pathspec beginning with a dash”
  1. git-diff-cache: handle pathspec beginning with a dashJonas Fonseca, Jun 6, 2005
  2. cg-commit: prefix pathspec argument with --Jonas Fonseca, Jun 6, 2005
  3. Petr BaudisJun 8, 2005
  4. Linus TorvaldsJun 8, 2005
  5. Petr BaudisJun 8, 2005
  6. Linus TorvaldsJun 8, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.