* [PATCH] support cover letter before commit log, using "+++"
@ 2006-07-23 21:45 Martin Waitz
2006-07-24 6:54 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Martin Waitz @ 2006-07-23 21:45 UTC (permalink / raw)
To: git
We already have a "---" separator to end the commit log.
But writing the cover letter after this separator looks strange.
Now it is possible to put the cover letter and comments both before
or after the commit log, as the author sees fit.
Just put the commit log between lines starting with "+++" and "---".
Signed-off-by: Martin Waitz <tali@admingilde.org>
---
builtin-mailinfo.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index ac53f76..a1cfc81 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -690,6 +690,13 @@ static int handle_commit_msg(int *seen)
return 1;
}
+ /* check for separator between cover-letter and commit log */
+ if (!memcmp("+++", line, 3)) {
+ rewind(cmitmsg);
+ ftruncate(fileno(cmitmsg), 0);
+ continue;
+ }
+
/* Unwrap transfer encoding and optionally
* normalize the log message to UTF-8.
*/
--
1.4.1.gd3582
--
Martin Waitz
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] support cover letter before commit log, using "+++"
2006-07-23 21:45 [PATCH] support cover letter before commit log, using "+++" Martin Waitz
@ 2006-07-24 6:54 ` Junio C Hamano
2006-07-24 7:04 ` Martin Waitz
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2006-07-24 6:54 UTC (permalink / raw)
To: Martin Waitz; +Cc: git
Martin Waitz <tali@admingilde.org> writes:
> We already have a "---" separator to end the commit log.
> But writing the cover letter after this separator looks strange.
> Now it is possible to put the cover letter and comments both before
> or after the commit log, as the author sees fit.
>
> Just put the commit log between lines starting with "+++" and "---".
>
> Signed-off-by: Martin Waitz <tali@admingilde.org>
I do not have problem with the implementation itself, but
* I always had an impression that cover letters are tolerated
not encouraged. In other words, as a good practice it would
be nice if necessary information is described in the commit
log messages themselves. Do we want to start encouraging the
cover letter with this patch?
* Has anybody ever used that "+++" as an auxiliary separator?
In other words, is it an established convention? If not,
would it be a good convention that we would want to establish
here?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] support cover letter before commit log, using "+++"
2006-07-24 6:54 ` Junio C Hamano
@ 2006-07-24 7:04 ` Martin Waitz
2006-07-24 9:53 ` Jakub Narebski
0 siblings, 1 reply; 4+ messages in thread
From: Martin Waitz @ 2006-07-24 7:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]
hoi :)
On Sun, Jul 23, 2006 at 11:54:22PM -0700, Junio C Hamano wrote:
> Martin Waitz <tali@admingilde.org> writes:
>
> > We already have a "---" separator to end the commit log.
> > But writing the cover letter after this separator looks strange.
> > Now it is possible to put the cover letter and comments both before
> > or after the commit log, as the author sees fit.
> >
> > Just put the commit log between lines starting with "+++" and "---".
> >
> > Signed-off-by: Martin Waitz <tali@admingilde.org>
>
> I do not have problem with the implementation itself, but
>
> * I always had an impression that cover letters are tolerated
> not encouraged. In other words, as a good practice it would
> be nice if necessary information is described in the commit
> log messages themselves. Do we want to start encouraging the
> cover letter with this patch?
that's right, but:
* before using automatic tools to generate mails from patches people
started their mails with "hello" or something similiar.
As these lines are frowned upon in the changelog people just stop
being polite.
* I have often seen patches evolving in an email thread.
With such an separator it is possible to keep the thread history
in one part and a clean change message in another part.
I don't really know if this +++ thing will be used much. It's just
something that I thought might be missing and it was easy to do ;-)
> * Has anybody ever used that "+++" as an auxiliary separator?
> In other words, is it an established convention? If not,
> would it be a good convention that we would want to establish
> here?
I haven't seen the "+++" before here. People have used their own
"cut here" markers somethimes but I don't think their is an
established convention already.
The "+++" just felt good in combination with the "---" end marker.
--
Martin Waitz
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] support cover letter before commit log, using "+++"
2006-07-24 7:04 ` Martin Waitz
@ 2006-07-24 9:53 ` Jakub Narebski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2006-07-24 9:53 UTC (permalink / raw)
To: git
Martin Waitz wrote:
> I haven't seen the "+++" before here. People have used their own
> "cut here" markers somethimes but I don't think their is an
> established convention already.
Most common I think is the variation of "scissors" separator, i.e.
-- >8 --
> The "+++" just felt good in combination with the "---" end marker.
True.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-24 9:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-23 21:45 [PATCH] support cover letter before commit log, using "+++" Martin Waitz
2006-07-24 6:54 ` Junio C Hamano
2006-07-24 7:04 ` Martin Waitz
2006-07-24 9:53 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).