All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git send-email: include [anything]-by: signatures
@ 2013-08-26 16:57 Michael S. Tsirkin
  2013-08-31 19:22 ` Michael S. Tsirkin
  0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-08-26 16:57 UTC (permalink / raw)
  To: git

Consider [anything]-by: a valid signature.
This includes Tested-by: Acked-by: Reviewed-by: etc.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 git-send-email.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index ecbf56f..bb9093b 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1359,7 +1359,7 @@ foreach my $t (@files) {
 	# Now parse the message body
 	while(<$fh>) {
 		$message .=  $_;
-		if (/^(Signed-off-by|Cc): (.*)$/i) {
+		if (/^([A-Za-z-]*-by|Cc): (.*)$/i) {
 			chomp;
 			my ($what, $c) = ($1, $2);
 			chomp $c;
-- 
MST

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-08-26 16:57 [PATCH] git send-email: include [anything]-by: signatures Michael S. Tsirkin
@ 2013-08-31 19:22 ` Michael S. Tsirkin
  2013-09-03  6:35   ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-08-31 19:22 UTC (permalink / raw)
  To: git; +Cc: gitster

On Mon, Aug 26, 2013 at 07:57:47PM +0300, Michael S. Tsirkin wrote:
> Consider [anything]-by: a valid signature.
> This includes Tested-by: Acked-by: Reviewed-by: etc.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Ping.
Any opinion on whether this change is acceptable?

> ---
>  git-send-email.perl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index ecbf56f..bb9093b 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1359,7 +1359,7 @@ foreach my $t (@files) {
>  	# Now parse the message body
>  	while(<$fh>) {
>  		$message .=  $_;
> -		if (/^(Signed-off-by|Cc): (.*)$/i) {
> +		if (/^([A-Za-z-]*-by|Cc): (.*)$/i) {
>  			chomp;
>  			my ($what, $c) = ($1, $2);
>  			chomp $c;
> -- 
> MST
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-08-31 19:22 ` Michael S. Tsirkin
@ 2013-09-03  6:35   ` Jeff King
  2013-09-03  8:44     ` Michael S. Tsirkin
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2013-09-03  6:35 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: git, gitster

On Sat, Aug 31, 2013 at 10:22:50PM +0300, Michael S. Tsirkin wrote:

> On Mon, Aug 26, 2013 at 07:57:47PM +0300, Michael S. Tsirkin wrote:
> > Consider [anything]-by: a valid signature.
> > This includes Tested-by: Acked-by: Reviewed-by: etc.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Ping.
> Any opinion on whether this change is acceptable?

I was left confused by your commit message, as it wasn't clear to me
what a "signature" is. But the point of it seems to be that people
mention others in commit messages using "X-by:" pseudo-headers besides
"signed-off-by", and you want to cc them along with the usual S-O-B.

That seems like a reasonable goal, but I have two concerns.

One, I would think the utility of this would be per-project, depending
on what sorts of things people in a particular project put in
pseudo-headers.  Grepping the kernel history shows that most X-by
headers have a person on the right-hand side, though quite often it is
not a valid email address (on the other hand, quite a few s-o-b lines in
the kernel do not have a valid email).

And two, the existing options for enabling/disabling this code all
explicitly mention signed-off-by, which becomes awkward. You did not
update the documentation in your patch, but I think you would end up
having to explain that "--supress-cc=sob" and "--signed-off-by-cc"
really mean "all pseudo-header lines ending in -by".

So I think it might be a nicer approach to introduce a new "suppress-cc"
class that means "all pseudo-header tokens ending in -by" or similar.
We might even want the new behavior on by default, but it would at least
give the user an escape hatch if their project generates a lot of false
positives.

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03  6:35   ` Jeff King
@ 2013-09-03  8:44     ` Michael S. Tsirkin
  2013-09-03 17:06       ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-09-03  8:44 UTC (permalink / raw)
  To: Jeff King; +Cc: git, gitster

On Tue, Sep 03, 2013 at 02:35:35AM -0400, Jeff King wrote:
> On Sat, Aug 31, 2013 at 10:22:50PM +0300, Michael S. Tsirkin wrote:
> 
> > On Mon, Aug 26, 2013 at 07:57:47PM +0300, Michael S. Tsirkin wrote:
> > > Consider [anything]-by: a valid signature.
> > > This includes Tested-by: Acked-by: Reviewed-by: etc.
> > > 
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > 
> > Ping.
> > Any opinion on whether this change is acceptable?
> 
> I was left confused by your commit message, as it wasn't clear to me
> what a "signature" is. But the point of it seems to be that people
> mention others in commit messages using "X-by:" pseudo-headers besides
> "signed-off-by", and you want to cc them along with the usual S-O-B.
> 
> That seems like a reasonable goal, but I have two concerns.
> 
> One, I would think the utility of this would be per-project, depending
> on what sorts of things people in a particular project put in
> pseudo-headers.  Grepping the kernel history shows that most X-by
> headers have a person on the right-hand side, though quite often it is
> not a valid email address (on the other hand, quite a few s-o-b lines in
> the kernel do not have a valid email).
> 
> And two, the existing options for enabling/disabling this code all
> explicitly mention signed-off-by, which becomes awkward. You did not
> update the documentation in your patch, but I think you would end up
> having to explain that "--supress-cc=sob" and "--signed-off-by-cc"
> really mean "all pseudo-header lines ending in -by".
> 
> So I think it might be a nicer approach to introduce a new "suppress-cc"
> class that means "all pseudo-header tokens ending in -by" or similar.
> We might even want the new behavior on by default, but it would at least
> give the user an escape hatch if their project generates a lot of false
> positives.
> 
> -Peff

I guess there's always cccmd, no?

-- 
MST

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03  8:44     ` Michael S. Tsirkin
@ 2013-09-03 17:06       ` Junio C Hamano
  2013-09-03 21:01         ` Michael S. Tsirkin
  0 siblings, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2013-09-03 17:06 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Jeff King, git

"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Tue, Sep 03, 2013 at 02:35:35AM -0400, Jeff King wrote:
>> On Sat, Aug 31, 2013 at 10:22:50PM +0300, Michael S. Tsirkin wrote:
>> 
>> > On Mon, Aug 26, 2013 at 07:57:47PM +0300, Michael S. Tsirkin wrote:
>> > > Consider [anything]-by: a valid signature.
>> > > This includes Tested-by: Acked-by: Reviewed-by: etc.
>> > > 
>> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> > 
>> > Ping.
>> > Any opinion on whether this change is acceptable?
>> 
>> I was left confused by your commit message, as it wasn't clear to me
>> what a "signature" is. But the point of it seems to be that people
>> mention others in commit messages using "X-by:" pseudo-headers besides
>> "signed-off-by", and you want to cc them along with the usual S-O-B.
>> 
>> That seems like a reasonable goal, but I have two concerns.
>> 
>> One, I would think the utility of this would be per-project, depending
>> on what sorts of things people in a particular project put in
>> pseudo-headers.  Grepping the kernel history shows that most X-by
>> headers have a person on the right-hand side, though quite often it is
>> not a valid email address (on the other hand, quite a few s-o-b lines in
>> the kernel do not have a valid email).
>> 
>> And two, the existing options for enabling/disabling this code all
>> explicitly mention signed-off-by, which becomes awkward. You did not
>> update the documentation in your patch, but I think you would end up
>> having to explain that "--supress-cc=sob" and "--signed-off-by-cc"
>> really mean "all pseudo-header lines ending in -by".
>> 
>> So I think it might be a nicer approach to introduce a new "suppress-cc"
>> class that means "all pseudo-header tokens ending in -by" or similar.
>> We might even want the new behavior on by default, but it would at least
>> give the user an escape hatch if their project generates a lot of false
>> positives.
>> 
>> -Peff
>
> I guess there's always cccmd, no?

I am having a hard time deciphering what this response means.  Are
you suggesting that people can use cccmd to do what your patch
wants to do, so the patch is not needed?

I tend to agree with Peff that it is a reasonable goal to allow more
than just the fixed set of trailers to be used as a source to decide
whom to Cc, and if it can be generic enough, it would make sense to
supply users such support so that various projects do not have to
invent their own.

The question of course is the first point Peff raised.  I am not
sure offhand what the right per-project customization interface
would be.  A starting point might be something like:

	--cc-trailer=signed-off-by,acked-by,reviewed-by

or even

	--cc-trailer='*-by'

and an obvious configuration variable that gives the default for it.
That would eventually allow us not to special case any fixed set of
trailers like S-o-b like the current code does, which would be a big
plus.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03 17:06       ` Junio C Hamano
@ 2013-09-03 21:01         ` Michael S. Tsirkin
  2013-09-03 21:03           ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-09-03 21:01 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, git

On Tue, Sep 03, 2013 at 10:06:19AM -0700, Junio C Hamano wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
> > On Tue, Sep 03, 2013 at 02:35:35AM -0400, Jeff King wrote:
> >> On Sat, Aug 31, 2013 at 10:22:50PM +0300, Michael S. Tsirkin wrote:
> >> 
> >> > On Mon, Aug 26, 2013 at 07:57:47PM +0300, Michael S. Tsirkin wrote:
> >> > > Consider [anything]-by: a valid signature.
> >> > > This includes Tested-by: Acked-by: Reviewed-by: etc.
> >> > > 
> >> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >> > 
> >> > Ping.
> >> > Any opinion on whether this change is acceptable?
> >> 
> >> I was left confused by your commit message, as it wasn't clear to me
> >> what a "signature" is. But the point of it seems to be that people
> >> mention others in commit messages using "X-by:" pseudo-headers besides
> >> "signed-off-by", and you want to cc them along with the usual S-O-B.
> >> 
> >> That seems like a reasonable goal, but I have two concerns.
> >> 
> >> One, I would think the utility of this would be per-project, depending
> >> on what sorts of things people in a particular project put in
> >> pseudo-headers.  Grepping the kernel history shows that most X-by
> >> headers have a person on the right-hand side, though quite often it is
> >> not a valid email address (on the other hand, quite a few s-o-b lines in
> >> the kernel do not have a valid email).
> >> 
> >> And two, the existing options for enabling/disabling this code all
> >> explicitly mention signed-off-by, which becomes awkward. You did not
> >> update the documentation in your patch, but I think you would end up
> >> having to explain that "--supress-cc=sob" and "--signed-off-by-cc"
> >> really mean "all pseudo-header lines ending in -by".
> >> 
> >> So I think it might be a nicer approach to introduce a new "suppress-cc"
> >> class that means "all pseudo-header tokens ending in -by" or similar.
> >> We might even want the new behavior on by default, but it would at least
> >> give the user an escape hatch if their project generates a lot of false
> >> positives.
> >> 
> >> -Peff
> >
> > I guess there's always cccmd, no?
> 
> I am having a hard time deciphering what this response means.  Are
> you suggesting that people can use cccmd to do what your patch
> wants to do, so the patch is not needed?
> 
> I tend to agree with Peff that it is a reasonable goal to allow more
> than just the fixed set of trailers to be used as a source to decide
> whom to Cc, and if it can be generic enough, it would make sense to
> supply users such support so that various projects do not have to
> invent their own.
> 
> The question of course is the first point Peff raised.  I am not
> sure offhand what the right per-project customization interface
> would be.  A starting point might be something like:
> 
> 	--cc-trailer=signed-off-by,acked-by,reviewed-by

tested-by, reported-by ...

> or even
> 
> 	--cc-trailer='*-by'
> 
> and an obvious configuration variable that gives the default for it.
> That would eventually allow us not to special case any fixed set of
> trailers like S-o-b like the current code does, which would be a big
> plus.

What bothers me is that git normally uses gawk based patterns,
but send-email is in perl so it has a different syntax for regexp.
What do you suggest?  Make a small binary to do the matching for us?

-- 
MST

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03 21:01         ` Michael S. Tsirkin
@ 2013-09-03 21:03           ` Jeff King
  2013-09-03 21:24             ` Michael S. Tsirkin
  2013-09-03 21:39             ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Jeff King @ 2013-09-03 21:03 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Junio C Hamano, git

On Wed, Sep 04, 2013 at 12:01:49AM +0300, Michael S. Tsirkin wrote:

> > The question of course is the first point Peff raised.  I am not
> > sure offhand what the right per-project customization interface
> > would be.  A starting point might be something like:
> > 
> > 	--cc-trailer=signed-off-by,acked-by,reviewed-by
> 
> tested-by, reported-by ...

Yeah, I think having the list customizable is nice, but not allowing
some pattern matching seems unfriendly, as it requires the user to
enumerate a potentially long list.

> > 	--cc-trailer='*-by'
> > 
> > and an obvious configuration variable that gives the default for it.
> > That would eventually allow us not to special case any fixed set of
> > trailers like S-o-b like the current code does, which would be a big
> > plus.
> 
> What bothers me is that git normally uses gawk based patterns,
> but send-email is in perl so it has a different syntax for regexp.
> What do you suggest?  Make a small binary to do the matching for us?

Would fnmatch-style globbing (like "*-by") be enough? That should be
easy to do in perl.

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03 21:03           ` Jeff King
@ 2013-09-03 21:24             ` Michael S. Tsirkin
  2013-09-03 21:39             ` Junio C Hamano
  1 sibling, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-09-03 21:24 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, git

On Tue, Sep 03, 2013 at 05:03:52PM -0400, Jeff King wrote:
> On Wed, Sep 04, 2013 at 12:01:49AM +0300, Michael S. Tsirkin wrote:
> 
> > > The question of course is the first point Peff raised.  I am not
> > > sure offhand what the right per-project customization interface
> > > would be.  A starting point might be something like:
> > > 
> > > 	--cc-trailer=signed-off-by,acked-by,reviewed-by
> > 
> > tested-by, reported-by ...
> 
> Yeah, I think having the list customizable is nice, but not allowing
> some pattern matching seems unfriendly, as it requires the user to
> enumerate a potentially long list.
> 
> > > 	--cc-trailer='*-by'
> > > 
> > > and an obvious configuration variable that gives the default for it.
> > > That would eventually allow us not to special case any fixed set of
> > > trailers like S-o-b like the current code does, which would be a big
> > > plus.
> > 
> > What bothers me is that git normally uses gawk based patterns,
> > but send-email is in perl so it has a different syntax for regexp.
> > What do you suggest?  Make a small binary to do the matching for us?
> 
> Would fnmatch-style globbing (like "*-by") be enough? That should be
> easy to do in perl.
> 
> -Peff

If you mean only support * - that would be easy.
Once you get into bracket expressions it gets messy quickly
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03_05

-- 
MST

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03 21:03           ` Jeff King
  2013-09-03 21:24             ` Michael S. Tsirkin
@ 2013-09-03 21:39             ` Junio C Hamano
  2013-09-04  8:09               ` Michael S. Tsirkin
  1 sibling, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2013-09-03 21:39 UTC (permalink / raw)
  To: Jeff King; +Cc: Michael S. Tsirkin, git

Jeff King <peff@peff.net> writes:

> On Wed, Sep 04, 2013 at 12:01:49AM +0300, Michael S. Tsirkin wrote:
>
>> > The question of course is the first point Peff raised.  I am not
>> > sure offhand what the right per-project customization interface
>> > would be.  A starting point might be something like:
>> > 
>> > 	--cc-trailer=signed-off-by,acked-by,reviewed-by
>> 
>> tested-by, reported-by ...
>
> Yeah, I think having the list customizable is nice, but not allowing
> some pattern matching seems unfriendly, as it requires the user to
> enumerate a potentially long list.
>
>> > 	--cc-trailer='*-by'
>> > 
>> > and an obvious configuration variable that gives the default for it.
>> > That would eventually allow us not to special case any fixed set of
>> > trailers like S-o-b like the current code does, which would be a big
>> > plus.
>> 
>> What bothers me is that git normally uses gawk based patterns,
>> but send-email is in perl so it has a different syntax for regexp.
>> What do you suggest?  Make a small binary to do the matching for us?
>
> Would fnmatch-style globbing (like "*-by") be enough? That should be
> easy to do in perl.

Web query finds File::FnMatch; I do not know if that is the most
commonly used, or if it comes with the base distribution, though.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] git send-email: include [anything]-by: signatures
  2013-09-03 21:39             ` Junio C Hamano
@ 2013-09-04  8:09               ` Michael S. Tsirkin
  0 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2013-09-04  8:09 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, git

On Tue, Sep 03, 2013 at 02:39:05PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
> 
> > On Wed, Sep 04, 2013 at 12:01:49AM +0300, Michael S. Tsirkin wrote:
> >
> >> > The question of course is the first point Peff raised.  I am not
> >> > sure offhand what the right per-project customization interface
> >> > would be.  A starting point might be something like:
> >> > 
> >> > 	--cc-trailer=signed-off-by,acked-by,reviewed-by
> >> 
> >> tested-by, reported-by ...
> >
> > Yeah, I think having the list customizable is nice, but not allowing
> > some pattern matching seems unfriendly, as it requires the user to
> > enumerate a potentially long list.
> >
> >> > 	--cc-trailer='*-by'
> >> > 
> >> > and an obvious configuration variable that gives the default for it.
> >> > That would eventually allow us not to special case any fixed set of
> >> > trailers like S-o-b like the current code does, which would be a big
> >> > plus.
> >> 
> >> What bothers me is that git normally uses gawk based patterns,
> >> but send-email is in perl so it has a different syntax for regexp.
> >> What do you suggest?  Make a small binary to do the matching for us?
> >
> > Would fnmatch-style globbing (like "*-by") be enough? That should be
> > easy to do in perl.
> 
> Web query finds File::FnMatch; I do not know if that is the most
> commonly used, or if it comes with the base distribution, though.

It's also just a wrapper for the system's fnmatch - so I expect
it doesn't work in the mingw environment.

-- 
MST

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-09-04  8:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-26 16:57 [PATCH] git send-email: include [anything]-by: signatures Michael S. Tsirkin
2013-08-31 19:22 ` Michael S. Tsirkin
2013-09-03  6:35   ` Jeff King
2013-09-03  8:44     ` Michael S. Tsirkin
2013-09-03 17:06       ` Junio C Hamano
2013-09-03 21:01         ` Michael S. Tsirkin
2013-09-03 21:03           ` Jeff King
2013-09-03 21:24             ` Michael S. Tsirkin
2013-09-03 21:39             ` Junio C Hamano
2013-09-04  8:09               ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.