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

cg-commit path handling problem

From
CJChristian Jaeger <christian@jaeger.mine.nu>
Date
May 4, 2006, 15:12 UTC
Message-ID
<p04320440c07fca04afea@[192.168.40.11]>
Hello

I did create a repository from a directory containing, amongst other stuff, files starting with a $ sign. E.g.

$ find ./foo ./bar ./var/cache ./var/cache/$foo ./var/cache/$foo::bar ./var/cache/$baz

$ cg-init ...

Now I realized that I didn't want the var directory in the repository and did

$ cg-rm -r var $ cg-commit var

which worked without warning, but:

$ cg-status .. D var/cache/$foo D var/cache/$foo::bar D var/cache/$baz

So I try again:
$ cg-commit var

will open the editor with the $.. files in the CG: part, I enter a commit message, exit the editor, it sayys "Refusing to make an empty commit".

$ cg-commit -f var
says "committed as ....", but cg-status will still show the same files as D
As per suggestion from #git, I did the equivalent of
find var -name '$*' |xargs git commit -m please_go_away --
which worked.

So I guess that the cg-commit shell script isn't protecting file paths against variable substitution somewhere.

This is cogito-0.17.2 and git 1.2.6 (from Debian unstable rebuilt on Sarge).

Thanks for caring, Christian.

Message 1 of 1 in “cg-commit path handling problem”
  1. Christian JaegerMay 4, 2006

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.