Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-13 Thread Junio C Hamano
Vasco Almeida writes: >> We only update comment_line_char from the default "#" when the >> configured value is a single-byte character and we ignore incorrect >> values in the configuration file. So I think the patch you sent is >> correct after all. > > I am still not sure what version do we pre

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-13 Thread Vasco Almeida
A Sáb, 10-12-2016 às 14:09 -0800, Junio C Hamano escreveu: > We only update comment_line_char from the default "#" when the > configured value is a single-byte character and we ignore incorrect > values in the configuration file.  So I think the patch you sent is > correct after all. I am still no

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-10 Thread Junio C Hamano
Vasco Almeida writes: > I wonder why this is important when Git errors out when > core.commentChar is set to more than 1 characters or 0 characters. I think it should be consistent with the way core.commentchar is treated in the rest of the system, namely this bit from config.c: if (!st

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-10 Thread Vasco Almeida
A Sex, 09-12-2016 às 14:23 -0800, Junio C Hamano escreveu: > > This is exactly the same issue I fixed for rebase -i recently. > > Yes, but the patch we see here punts "core.commentChar is not a > single-byte single-letter--panic!" case differently.  I think you > did "just take the first one" in "

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-09 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Vasco, > > On Fri, 9 Dec 2016, Vasco Almeida wrote: > >> A Ter, 22-11-2016 às 09:42 -0800, Junio C Hamano escreveu: >> > The incremental update below looks sensible. We'd also want to >> > protect this codepath from a misconfigured two-or-more byte sequence >> > i

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-09 Thread Johannes Schindelin
Hi Vasco, On Fri, 9 Dec 2016, Vasco Almeida wrote: > A Ter, 22-11-2016 às 09:42 -0800, Junio C Hamano escreveu: > > The incremental update below looks sensible.  We'd also want to > > protect this codepath from a misconfigured two-or-more byte sequence > > in core.commentchar, I would suspect, to

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-09 Thread Vasco Almeida
A Ter, 22-11-2016 às 09:42 -0800, Junio C Hamano escreveu: > The incremental update below looks sensible.  We'd also want to > protect this codepath from a misconfigured two-or-more byte sequence > in core.commentchar, I would suspect, to be consistent. Are the below changes alright for what you p

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-11-22 Thread Junio C Hamano
Vasco Almeida writes: > A Sex, 11-11-2016 às 11:45 -0100, Vasco Almeida escreveu: >> +=item comment_lines ( STRING [, STRING... ]) >> + >> +Comments lines following core.commentchar configuration. >> + >> +=cut >> + >> +sub comment_lines { >> +   my $comment_line_char = config("core.commentch

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-11-22 Thread Vasco Almeida
A Sex, 11-11-2016 às 11:45 -0100, Vasco Almeida escreveu: > +=item comment_lines ( STRING [, STRING... ]) > + > +Comments lines following core.commentchar configuration. > + > +=cut > + > +sub comment_lines { > +   my $comment_line_char = config("core.commentchar") || '#'; > +   return pref

[PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-11-11 Thread Vasco Almeida
Add subroutines prefix_lines and comment_lines. Signed-off-by: Vasco Almeida --- perl/Git.pm | 24 1 file changed, 24 insertions(+) diff --git a/perl/Git.pm b/perl/Git.pm index b2732822a..69cd1ddec 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1438,6 +1438,30 @@ sub EN