On 6/24/06, Yann Dirson <ydirson@xxxxxxxxxx> wrote:
Junio wrote: > I agree with this in principle but we would need to make sure > that our own scripts do not expect that the message is cleaned > up when feeding a commit log message via stdin, -m or -F, and if > they do fix them before applying this patch. The only tools in git.git I could identify as using git-commit rather than commit-tree are: git-revert.sh: OK git-rebase.sh: only uses -C cogito, stgit, and pg also use commit-tree. Only qgit seems to be using git-commit, and probably makes use of this (mis)feature.
Yes, qgit uses git-commit, but issue is different. qgit uses the output of git status as a 'default text' used in the commit dialog. When commit button is pressed, after some message editing by the user, the comment lines are stripped _before_ to save the content of commit message in a temporary file to be used by git-commit with -F option. The comment stripping is done by this code: msg = textEditMsg->text(); msg.remove(QRegExp("\\n\\s*#[^\\n]*")); // strip comments msg.replace(QRegExp("[ \\t\\r\\f\\v]+\\n"), "\n"); // strip line trailing cruft msg = msg.stripWhiteSpace(); as you see it rely on the '#' character. So conclusions are: 1) It's ok to let git-comit do not strip comment lines, it's already done by qgit. 2) Please don't change git status output to use another symbol to mark comment lines because it will break line stripping code. Marco - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html