From: Gerrit Pape Date: Mon, 02 Jan 2006 12:13:13 GMT Subject: cogito: commit message from stdin and -m switch Message-ID: <20060102120709.13166.qmail@5a5356efda0133.315fe32.mid.smarden.org> Hi, cg-commit(1) states -m MESSAGE Specify the commit message, which is used instead of starting up an editor (if the input is not stdin, the input is appended after all the -m messages). Multiple -m parameters are appended to a single commit message, each as separate paragraph. What happens is that the message on stdin overrides the message given through the -m switch: $ cg-init -m initial defaulting to local storage area Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 Committed as 4db6889339c6d6775b18673f12bc91adf86f1c2c. $ touch foo $ cg-add foo Adding file foo $ echo 'message1' |cg-commit -m 'message0' A foo Committed as 99d2bbca8ac65fa0c0af7c7536228f4b9470e70f. $ cg-log |head commit 99d2bbca8ac65fa0c0af7c7536228f4b9470e70f tree 4d5fcadc293a348e88f777dc0920f11e7d71441c parent 4db6889339c6d6775b18673f12bc91adf86f1c2c author Gerrit Pape Mon, 02 Jan 2006 12:07:59 +0000 committer Gerrit Pape Mon, 02 Jan 2006 12:07:59 +0000 message1 commit 4db6889339c6d6775b18673f12bc91adf86f1c2c tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 $ This also breaks the selftests with stdin not connected to a terminal (so in Debian package autobuilder environment): $ make Generating cg-version... $ make test