From: Matthieu Moy Date: Wed, 09 May 2007 14:59:03 GMT Subject: Re: [PATCH] git-commit: Reformat log messages provided on commandline Message-ID: In-Reply-To: <20070509142426.GV4489@pasky.or.cz> Petr Baudis writes: > - echo "$log_message" > + echo "$log_message" | fmt I wouldn't do that for the first line of the message. Someone typing $ git commit -m "a very very very very very very very very very very very very long summary" \ -m "a longer description of the above summary" Probably doesn't want his first line to be broken (otherwise, git-format-patch and other tools would be confused). So, that would be more like echo "$log_message" | (read first_line; echo "$first_line"; fmt) Perhaps another option would be to provide, say, a -M option, doing log_message="$log_message $(echo $1 | fmt)" to allow people to explicitely say whether they want reformatting. But that's probably overkill. -- Matthieu