{"thread":{"id":"4657","subject":"Re: [PATCH] git-commit: filter out log message lines only when editor was run.","startedAt":"2006-06-24T09:42:18Z","lastAt":"2006-06-25T07:21:00Z","messageCount":3,"participants":["Yann Dirson","Marco Costalba"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"22468","messageId":"20060624094217.GB7851@nowhere.earth","threadId":"4657","inReplyTo":null,"subject":"Re: [PATCH] git-commit: filter out log message lines only when editor was run.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2006-06-24T09:42:18Z","receivedAt":"2006-06-24T09:42:18Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"Junio wrote:\n> I agree with this in principle but we would need to make sure\n> that our own scripts do not expect that the message is cleaned\n> up when feeding a commit log message via stdin, -m or -F, and if\n> they do fix them before applying this patch.\n\nThe only tools in git.git I could identify as using git-commit rather\nthan commit-tree are:\n\ngit-revert.sh: OK\ngit-rebase.sh: only uses -C\n\ncogito, stgit, and pg also use commit-tree.  Only qgit seems to be\nusing git-commit, and probably makes use of this (mis)feature.\n\nI guess the easiest way to get the 1.4.0 behaviour is to change\ngit-commit calls to \"git-commit -e\" with EDITOR=true in the\nenvironment.  I'm not sure it would be worth adding a new flag to\nswitch on/off log stripping.\n\nBest regards,\n-- \nYann Dirson    <ydirson@altern.org> |\nDebian-related: <dirson@debian.org> |   Support Debian GNU/Linux:\n                                    |  Freedom, Power, Stability, Gratis\n     http://ydirson.free.fr/        | Check <http://www.debian.org/>\n"},{"id":"22524","messageId":"e5bfff550606250008k702acfadm8860e9b672bced56@mail.gmail.com","threadId":"4657","inReplyTo":"20060624094217.GB7851@nowhere.earth","subject":"Re: [PATCH] git-commit: filter out log message lines only when editor was run.","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2006-06-25T07:08:02Z","receivedAt":"2006-06-25T07:08:02Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 6/24/06, Yann Dirson <ydirson@altern.org> wrote:\n> Junio wrote:\n> > I agree with this in principle but we would need to make sure\n> > that our own scripts do not expect that the message is cleaned\n> > up when feeding a commit log message via stdin, -m or -F, and if\n> > they do fix them before applying this patch.\n>\n> The only tools in git.git I could identify as using git-commit rather\n> than commit-tree are:\n>\n> git-revert.sh: OK\n> git-rebase.sh: only uses -C\n>\n> cogito, stgit, and pg also use commit-tree.  Only qgit seems to be\n> using git-commit, and probably makes use of this (mis)feature.\n>\n\nYes, qgit uses git-commit, but issue is different.\n\nqgit uses the output of git status as a 'default text' used in the\ncommit dialog. When commit button is pressed, after some message\nediting by the user,  the comment lines are stripped _before_ to save\nthe content of commit message in a temporary file to be used by\ngit-commit with -F option.\n\nThe comment stripping is done by this code:\n\n\tmsg = textEditMsg->text();\n\tmsg.remove(QRegExp(\"\\\\n\\\\s*#[^\\\\n]*\")); // strip comments\n\tmsg.replace(QRegExp(\"[ \\\\t\\\\r\\\\f\\\\v]+\\\\n\"), \"\\n\"); // strip line trailing cruft\n\tmsg = msg.stripWhiteSpace();\n\nas you see it rely on the  '#' character.\n\nSo conclusions are:\n\n1) It's ok to let git-comit do not strip comment lines, it's already\ndone by qgit.\n\n2) Please don't change git status output to use another symbol to mark\ncomment lines because it will break line stripping code.\n\n        Marco\n"},{"id":"22525","messageId":"20060625072100.GG1502@nowhere.earth","threadId":"4657","inReplyTo":"e5bfff550606250008k702acfadm8860e9b672bced56@mail.gmail.com","subject":"Re: [PATCH] git-commit: filter out log message lines only when editor was run.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2006-06-25T07:21:00Z","receivedAt":"2006-06-25T07:21:00Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Sun, Jun 25, 2006 at 09:08:02AM +0200, Marco Costalba wrote:\n> 1) It's ok to let git-comit do not strip comment lines, it's already\n> done by qgit.\n\nThat's great news :)\n\n> 2) Please don't change git status output to use another symbol to mark\n> comment lines because it will break line stripping code.\n\nIf it ever gets changed, it should anyway IMHO be made a parameter.  A\nstrategy could be to make it customizable first, advertize this loudly\nso tools adapt themselves to force the prefix to what suits them best,\nand then eventually change the default in a major release.\n\nBest regards,\n-- \nYann Dirson    <ydirson@altern.org> |\nDebian-related: <dirson@debian.org> |   Support Debian GNU/Linux:\n                                    |  Freedom, Power, Stability, Gratis\n     http://ydirson.free.fr/        | Check <http://www.debian.org/>\n"}]}