{"thread":{"id":"564","subject":"[PATCH] Fix cg-commit to handle files with leading '-'","startedAt":"2005-05-11T00:55:25Z","lastAt":"2005-05-11T00:55:25Z","messageCount":1,"participants":["Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"3016","messageId":"20050511005525.GB3055@diku.dk","threadId":"564","inReplyTo":null,"subject":"[PATCH] Fix cg-commit to handle files with leading '-'","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-05-11T00:55:25Z","receivedAt":"2005-05-11T00:55:25Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Hi Pasky,\n\ncg-commit dies with \"update-cache failed\" message when adding files\nbeginning with a '-' because the '--' arg is missing.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n\n-- \nJonas Fonseca\n\n\nIndex: cg-commit\n===================================================================\n--- 673ad20e23591a8e5bdf18a755a5dea1755b7bf6/cg-commit  (mode:100755)\n+++ uncommitted/cg-commit  (mode:100755)\n@@ -140,13 +140,13 @@\n \n if [ ! \"$ignorecache\" ]; then\n \tif [ \"$customfiles\" ]; then\n-\t\tgit-update-cache --add --remove \"${commitfiles[@]}\" \\\n+\t\tgit-update-cache --add --remove -- \"${commitfiles[@]}\" \\\n \t\t\t|| die \"update-cache failed\"\n \t\texport GIT_INDEX_FILE=$(mktemp -t gitci.XXXXXX)\n \t\tgit-read-tree HEAD\n \tfi\n \t# TODO: Do the proper separation of adds, removes, and changes.\n-\tgit-update-cache --add --remove \"${commitfiles[@]}\" \\\n+\tgit-update-cache --add --remove -- \"${commitfiles[@]}\" \\\n \t\t|| die \"update-cache failed\"\n fi\n \n"}]}