{"thread":{"id":"2953","subject":"cogito: commit message from stdin and -m switch","startedAt":"2006-01-02T12:13:13Z","lastAt":"2006-01-02T12:13:13Z","messageCount":1,"participants":["Gerrit Pape"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14127","messageId":"20060102120709.13166.qmail@5a5356efda0133.315fe32.mid.smarden.org","threadId":"2953","inReplyTo":null,"subject":"cogito: commit message from stdin and -m switch","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2006-01-02T12:13:13Z","receivedAt":"2006-01-02T12:13:13Z","isPatch":false,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Hi, cg-commit(1) states\n\n-m MESSAGE\n       Specify the commit message, which is used instead of starting up\n       an editor (if the input is not  stdin,  the  input  is  appended\n       after  all the -m messages). Multiple -m parameters are appended\n       to a single commit message, each as separate paragraph.\n\nWhat happens is that the message on stdin overrides the message given\nthrough the -m switch:\n\n $ cg-init -m initial\n defaulting to local storage area\n Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n Committed as 4db6889339c6d6775b18673f12bc91adf86f1c2c.\n $ touch foo\n $ cg-add foo\n Adding file foo\n $ echo 'message1' |cg-commit -m 'message0'\n A foo\n Committed as 99d2bbca8ac65fa0c0af7c7536228f4b9470e70f.\n $ cg-log |head\n commit 99d2bbca8ac65fa0c0af7c7536228f4b9470e70f\n tree 4d5fcadc293a348e88f777dc0920f11e7d71441c\n parent 4db6889339c6d6775b18673f12bc91adf86f1c2c\n author Gerrit Pape <pape@smarden.org> Mon, 02 Jan 2006 12:07:59 +0000\n committer Gerrit Pape <pape@smarden.org> Mon, 02 Jan 2006 12:07:59 +0000\n \n     message1\n \n commit 4db6889339c6d6775b18673f12bc91adf86f1c2c\n tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n $ \n\nThis also breaks the selftests with stdin not connected to a terminal\n(so in Debian package autobuilder environment):\n\n $ make\n Generating cg-version...\n $ make test </dev/null \n make -C t/ all\n make[1]: Entering directory\n `/usr/local/src/Debian/Upstream/GIT/cogito/t'\n *** t9000-init.sh ***\n *   ok 1: initialize w/o the initial commit\n [...]\n * FAIL 16: check if the commit is proper\n         [ \"$(git-cat-file commit HEAD | sed -n '/^parent/q; /^$/{n; :a p; n; b a}')\" = \"silly commit message\n \n         continued\" ]\n *   ok 17: blow away the repository\n [...]\n $ \n\nRegards, Gerrit.\n"}]}