[PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

2015-07-01 Thread Remi Lespinet
> I'd vote for keeping it simple and not having the copyright notice. Most > t/*.sh do not have one. The Git history + mailing-list archives are much > better than in-code comments to keep track of who wrote what. > Remi: any objection on removing it? Sorry for not having resent the patches mysel

[PATCH v6 07/10] send-email: reduce dependencies impact on parse_address_line

2015-06-23 Thread Remi LESPINET
Matthieu Moy writes: > Your git send-email does not seem to like PATCHes 08-10/10 ;-). > > Up to PATCH 07, the series looks good. Yes, I get "Too many recipients" error... If I specify --no-signoff-by-cc then this is also aborted but I get no error (at least I've not seen it last time...). If I

[PATCH v6 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-23 Thread Remi Lespinet
like " j...@example.com ", "\t j...@example.com " or "j...@example.com". - interprets aliases in string containing leading and trailing whitespaces such as " alias" or "alias\t" like other options. Signed-off-by: Remi Lespinet --- g

[PATCH v6 09/10] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-23 Thread Remi Lespinet
ument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia Signed-off-by: Matthieu Moy Signed-off-by: Remi Lespinet --- Documentation/git-send-email.txt | 12 +-- git-send-email.perl

[PATCH v6 08/10] send-email: consider quote as delimiter instead of character

2015-06-23 Thread Remi Lespinet
Do not consider quote inside a recipient name as character when they are not escaped. This interprets: "Jane" "Doe" as: "Jane Doe" instead of: "Jane\" \"Doe" Signed-off-by: Remi Lespinet --- git-send-email.perl | 6 -- 1 f

[PATCH v6 07/10] send-email: reduce dependencies impact on parse_address_line

2015-06-23 Thread Remi Lespinet
uot;e In this case the result of parse_address_line is: With M::A : "Jane Do" e Without : "Jane Do e" When the user input is not correct, the behavior is also mostly the same. Unlike Mail::Address, this doesn't parse groups and recursive commentaries. Signed-o

[PATCH v6 02/10] send-email: allow aliases in patch header and command script outputs

2015-06-23 Thread Remi Lespinet
and --to-cmd. Example of script: #!/bin/sh echo alias1 echo alias2 Signed-off-by: Remi Lespinet --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62 insertions(+) diff --git a/git-send

[PATCH v6 04/10] send-email: refactor address list process

2015-06-23 Thread Remi Lespinet
Simplify code by creating a function which transform a list of strings containing email addresses (separated by commas, comporting aliases) into a clean list of valid email addresses. Signed-off-by: Remi Lespinet --- git-send-email.perl | 22 -- 1 file changed, 12 insertions

[PATCH v6 05/10] send-email: Allow use of aliases in the From field of --compose mode

2015-06-23 Thread Remi Lespinet
Aliases were expanded before considering the From field of the --compose option. This is inconsistent with other fields (To, Cc, ...) which already support aliases. Signed-off-by: Remi Lespinet --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git

[PATCH v6 06/10] send-email: minor code refactoring

2015-06-23 Thread Remi Lespinet
Group expressions in a single if statement. This avoid checking multiple time if the variable $sender is defined. Signed-off-by: Remi Lespinet --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index

[PATCH v6 03/10] t9001-send-email: refactor header variable fields replacement

2015-06-23 Thread Remi Lespinet
Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string: Date:.*$ -> Date: DATE-STRING Message-Id:.*$ -> Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ -> X-Mailer: X-MAILER-STRING Signed-off-by: Remi Lespinet --- t/t

[PATCH v6 01/10] t9001-send-email: move script creation in a setup test

2015-06-23 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001

[PATCH v5 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-23 Thread Remi Lespinet
Matthieu Moy writes: > > We can redirect todo_output to a variable but I've not found better... > > (Maybe someone has the solution here ?). Also there's no summary at > > the end of the test (as with other perl tests). > > You can get the 1..44 at the end with > > printf "1..%d\n", Test::More->

[PATCH v5 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-21 Thread Remi Lespinet
Matthieu Moy writes: > This is the last message I received in the series, and it's labeled > 07/10. Is that normal? No, it wasn't, I have seen no error message though... I'll take a look at that later. I just sent 0008, 0009 and 0010 but I seems that I've pasted the wrong line in the in-reply-t

[PATCH v5 08/10] send-email: consider quote as delimiter instead of character

2015-06-21 Thread Remi Lespinet
Do not consider quote inside a recipient name as character when they are not escaped. This interprets: "Jane" "Doe" as: "Jane Doe" instead of: "Jane\" \"Doe" Signed-off-by: Remi Lespinet --- git-send-email.perl | 6 -- 1 f

[PATCH v5 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-21 Thread Remi Lespinet
like " j...@example.com ", "\t j...@example.com " or "j...@example.com". - interprets aliases in string containing leading and trailing whitespaces such as " alias" or "alias\t" like other options. Signed-off-by: Remi Lespinet --- g

[PATCH v5 09/10] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-21 Thread Remi Lespinet
ument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia Signed-off-by: Matthieu Moy Signed-off-by: Remi Lespinet --- Documentation/git-send-email.txt | 12 +-- git-send-email.perl

[PATCH v5 03/10] t9001-send-email: refactor header variable fields replacement

2015-06-20 Thread Remi Lespinet
Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string: Date:.*$ -> Date: DATE-STRING Message-Id:.*$ -> Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ -> X-Mailer: X-MAILER-STRING Signed-off-by: Remi Lespinet --- t/t

[PATCH v5 04/10] send-email: refactor address list process

2015-06-20 Thread Remi Lespinet
Simplify code by creating a function which transform a list of strings containing email addresses (separated by commas, comporting aliases) into a clean list of valid email addresses. Signed-off-by: Remi Lespinet --- git-send-email.perl | 22 -- 1 file changed, 12 insertions

[PATCH v5 06/10] send-email: minor code refactoring

2015-06-20 Thread Remi Lespinet
Group expressions in a single if statement. This avoid checking multiple time if the variable $sender is defined. Signed-off-by: Remi Lespinet --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index

[PATCH v5 02/10] send-email: allow aliases in patch header and command script outputs

2015-06-20 Thread Remi Lespinet
and --to-cmd. Example of script: #!/bin/sh echo alias1 echo alias2 Signed-off-by: Remi Lespinet --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62 insertions(+) diff --git a/git-send

[PATCH v5 05/10] send-email: Allow use of aliases in the From field of --compose mode

2015-06-20 Thread Remi Lespinet
Aliases were expanded before considering the From field of the --compose option. This is inconsistent with other fields (To, Cc, ...) which already support aliases. Signed-off-by: Remi Lespinet --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git

[PATCH v5 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-20 Thread Remi Lespinet
uot;e In this case the result of parse_address_line is: With M::A : "Jane Do" e Without : "Jane Do e" When the user input is not correct, the behavior is also mostly the same. Unlike Mail::Address, this doesn't parse groups and recursive commentaries. Signed-off-

[PATCH v5 01/10] t9001-send-email: move script creation in a setup test

2015-06-20 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-18 Thread Remi Lespinet
Matthieu Moy writes: > Cool. Then almost all the work is done to get an automated test. Next > step would be to add the tests itself in the code. I would do that by > adding a hidden --selfcheck option to git send-email that would compare > Mail::Address->parse($string); and split_addrs($string);

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-18 Thread Remi Lespinet
> Remi Lespinet writes: > > > I've some more tests, maybe I should put them all in this post ? > > Yes, please post as much as you have. Ideally, this should be > automatically tested, but if you don't have time to write the automated > tests, at least having a

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Remi Lespinet
> Junio C Hamano writes > Suffix "rgx" that means "regular expression" is a bit unusual, and > also hard to read when squashed to another word. Elsewhere in the > same script, we seem to use $re_whatever to store precompiled > regular expressions, so perhaps $re_comment, $re_quote, etc.? Yes it'

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Remi Lespinet
Matthieu Moy writes > > + my $commentrgx=qr/\((?:[^)]*)\)/; > > + my $quotergx=qr/"(?:[^\"\\]|\\.)*"/; > > + my $wordrgx=qr/(?:[^]["\s()<>:;@\\,.]|\\.)+/; > > Spaces around = please. > ... > > + foreach my $token (@tokens) { > > + if ($token =~ /^[,;]$/) { > > Here and below: you'

[PATCH/RFC v4 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-17 Thread Remi Lespinet
Matthieu Moy writes > Remi Lespinet writes: > > if (defined $sender) { > > + $sender =~ s/^\s+|\s$//g; > I would say \s+ also for the second \s. Not really different, but it > feels wrong to iterate the substitution as many times as there are > trailing spaces

[PATCH/RFC v4 08/10] send-email: consider quote as delimiter instead of character

2015-06-17 Thread Remi Lespinet
Do not consider quote inside a recipient name as character when they are not escaped. This interprets: "Jane" "Doe" as: "Jane Doe" instead of: "Jane\" \"Doe" Signed-off-by: Remi Lespinet --- I don't know if it's an

[PATCH/RFC v4 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-17 Thread Remi Lespinet
like " j...@example.com ", "\t j...@example.com " or "j...@example.com". - interprets aliases in string containing leading and trailing whitespaces such as " alias" or "alias\t" like other options. Signed-off-by: Remi Lespinet --- g

[PATCH/RFC v4 09/10] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-17 Thread Remi Lespinet
ument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia Signed-off-by: Matthieu Moy Signed-off-by: Remi Lespinet --- Documentation/git-send-email.txt | 12 +-- git-send-email.perl

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Remi Lespinet
uot;e In this case the result of parse_address_line is: With M::A : "Jane Do" e Without : "Jane Do e" When the user input is not correct, the behavior is also mostly the same. Unlike Mail::Address, this doesn't parse groups and recursive commentaries. Signed-o

[PATCH/RFC v4 01/10] t9001-send-email: move script creation in a setup test

2015-06-17 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001

[PATCH/RFC v4 04/10] send-email: refactor address list process

2015-06-17 Thread Remi Lespinet
Simplify code by creating a function which transform a list of strings containing email addresses (separated by commas, comporting aliases) into a clean list of valid email addresses. Signed-off-by: Remi Lespinet --- git-send-email.perl | 22 -- 1 file changed, 12 insertions

[PATCH/RFC v4 05/10] send-email: Allow use of aliases in the From field of --compose mode

2015-06-17 Thread Remi Lespinet
Aliases were expanded before checking the From field of the --compose option. This is inconsistent with other fields (To, Cc, ...) which already support aliases. Signed-off-by: Remi Lespinet --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-send

[PATCH/RFC v4 03/10] t9001-send-email: refactor header variable fields replacement

2015-06-17 Thread Remi Lespinet
Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string: Date:.*$ -> Date: DATE-STRING Message-Id:.*$ -> Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ -> X-Mailer: X-MAILER-STRING Signed-off-by: Remi Lespinet --- t/t

[PATCH/RFC v4 06/10] send-email: minor code refactoring

2015-06-17 Thread Remi Lespinet
Group expressions in a single if statement. This avoid checking multiple time if the variable $sender is defined. Signed-off-by: Remi Lespinet --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index

[PATCH/RFC v4 02/10] send-email: allow aliases in patch header and command script outputs

2015-06-17 Thread Remi Lespinet
and --to-cmd. Example of script: #!/bin/sh echo alias1 echo alias2 Signed-off-by: Remi Lespinet --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62 insertions(+) diff --git a/git-send

[RFC] send-email quote issues

2015-06-15 Thread Remi Lespinet
Matthieu Moy writes > To me, the answer should be: do whatever the RFC says in email headers. > I'd expect anything that works in the To: header to work in the --to > option of git send-email. Ok sounds good to me ! -- To unsubscribe from this list: send the line "unsubscribe git" in the body

[RFC] send-email quote issues

2015-06-15 Thread Remi Lespinet
Matthieu Moy writes > I would say that using parse_address_line is good for consistancy in Git > anyway. If the behavior of parse_address_line is broken on some > corner-cases, then it should be fixed anyway. Ok, but I don't know what fixed means in these particular cases. Actually the proble

[RFC] send-email quote issues

2015-06-15 Thread Remi Lespinet
Hi, I'm currently working on git send-email to allow passing names containing commas. I would like to specify that the comma shouldn't be interpreted as a delimiter when there's quotes around: "Jane, Katarina Doe" This changes the behavior of the double quote. For example when passing: --t

[PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Remi Lespinet
Matthieu Moy writes: > Junio C Hamano writes: > > > Remi Lespinet writes: > > > >> I agree, I'd like to put it right after split_at_commas in a separate > >> function "trim_list". Is it a good idea even if the function is one > >&

[PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Remi Lespinet
Matthieu Moy writes: > Actually, once you have this, PATCH 6/7 becomes useless, right? (at > least, the test passes if I revert it) > It seems to me that doing this space trimming just once, inside or right > after split_at_commas would be clearer. You're right, I put it twice because of there'

[PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-10 Thread Remi Lespinet
> Nothing serious, but you did something weird while sending. This message > does not have a References: or an In-reply-to: field, so it breaks > threading. See how it's displayed on > > http://thread.gmane.org/gmane.comp.version-control.git Yes, send-email was aborted after 5/7, I realized and

[PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-09 Thread Remi Lespinet
Remove leading and trailing whitespaces when sanitizing addresses so that git send-email give the same output when passing arguments like " j...@example.com " or "\t j...@example.com " as with "j...@example.com". The next commit will introduce a test for thi

[PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-09 Thread Remi Lespinet
, --bcc options or by the git send-email prompt. Signed-off-by: Remi Lespinet --- git-send-email.perl | 1 + t/t9001-send-email.sh | 24 2 files changed, 25 insertions(+) diff --git a/git-send-email.perl b/git-send-email.perl index 3d144bd..34c8b8b 100755 --- a/git-

[PATCH v3 4/7] send-email: refactor address list process

2015-06-09 Thread Remi Lespinet
Simplify code by creating a funct (comma separated, with aliases ...) into a simple list of valid email addresses. Signed-off-by: Remi Lespinet --- git-send-email.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-send-email.perl b/git-send

[PATCH v3 3/7] t9001-send-email: refactor header variable fields replacement

2015-06-09 Thread Remi Lespinet
. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 062c703..806f066 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -522,6 +522,12 @@ Result

[PATCH v3 2/7] send-email: allow aliases in patch header and command script outputs

2015-06-09 Thread Remi Lespinet
ing an alias as an argument of --from is not possible, but modifying the from field in the patch manually is. Signed-off-by: Remi Lespinet --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62 insertions(+) diff --git

[PATCH v3 5/7] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-09 Thread Remi Lespinet
;Jane, Doe" ' Remove the limitation imposed by 79ee555b (Check and document the options to prevent mistakes, 2006-06-21) which rejected every argument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia

[PATCH v3 1/7] t9001-send-email: move script creation in a setup test

2015-06-09 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. This will be used in the next commit. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[PATCH 0/7] changes from last version

2015-06-09 Thread Remi Lespinet
CHANGES (since last submitted version) 1/7 : identical to previous 1/5 2/7 : identical to previous 2/5 3/7 : identical to previous 3/5 4/7 : Modification previously done by 5/5 (refactoring address process) 5/7 : identical modulo a minor change at hunk @@ -1023,8 +1009,13 @@ in the function

[PATCH/RFC v2 5/5] send-email: refactor address list process

2015-06-08 Thread Remi Lespinet
Junio C Hamano writes > Matthieu Moy writes: > > > Remi Lespinet writes: > > > >> Simplify code by creating a function to transform list of email lists > >> (comma separated, with aliases ...) into a simple list of valid email > >> addresses. &g

[PATCH/RFC v2 5/5] send-email: refactor address list process

2015-06-08 Thread Remi Lespinet
Matthieu Moy writes: > To me, the series is ready now, and I don't think re-rolling it would be > a good time investment. Plus, I spent time reviewing this series and > with my proposal I'd need to review a relatively different one. Ok, thanks. -- To unsubscribe from this list: send the line "un

[PATCH/RFC v2 5/5] send-email: refactor address list process

2015-06-08 Thread Remi Lespinet
Matthieu Moy writes: > Remi Lespinet writes: > > > Simplify code by creating a function to transform list of email lists > > (comma separated, with aliases ...) into a simple list of valid email > > addresses. > > I would have found the series easier to

[PATCH/RFC v2 5/5] send-email: refactor address list process

2015-06-06 Thread Remi Lespinet
Simplify code by creating a function to transform list of email lists (comma separated, with aliases ...) into a simple list of valid email addresses. Signed-off-by: Remi Lespinet --- I'm not sure about the name of the function... git-send-email.perl | 28 +--- 1

[PATCH/RFC v2 3/5] t9001-send-email: refactor header variable fields replacement

2015-06-06 Thread Remi Lespinet
. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 062c703..806f066 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -522,6 +522,12 @@ Result

[PATCH/RFC v2 2/5] send-email: allow aliases in patch header and command script outputs

2015-06-06 Thread Remi Lespinet
and --to-cmd. Example of script: #!/bin/sh echo alias1 echo alias2 Signed-off-by: Remi Lespinet --- Note that the --from option of git format-patch takes an argument which must be formated as .*<.*> (if not, git format-patch will be aborted with fatal: invalid iden

[PATCH/RFC v2 4/5] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-06 Thread Remi Lespinet
;Jane, Doe" ' Remove the limitation imposed by 79ee555b (Check and document the options to prevent mistakes, 2006-06-21) which rejected every argument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia

[PATCH/RFC v2 1/5] t9001-send-email: move script creation in a setup test

2015-06-06 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. This will be used in the next commit. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[PATCH v5 3/3] git-am: add am.threeWay config variable

2015-06-04 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet --- Only one change compared to previous version

[PATCH v5 1/3] git-am.sh: fix initialization of the threeway variable

2015-06-04 Thread Remi Lespinet
Initialization for the threeway variable was missing. This caused a behavior change for command lines like: threeway=t git am ... This commit adds initialization for this variable. Signed-off-by: Remi Lespinet --- git-am.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-am.sh

[PATCH v5 2/3] t4150-am: refactor am -3 tests

2015-06-04 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet --- t/t4150-am.sh | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions

[RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Remi Lespinet
On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET wrote: > > Hi, > > Working on git-send-email, I've seen that there's no aliases support > when manually adding a recipient in a 'To' or 'Cc' field in a patch > and for the --to-cmd and --cc-cmd. >

[RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Remi Lespinet
> On Thu, Jun 4, 2015 at 5:11 PM, Stefan Beller wrote: > > On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET > > wrote: > >> Working on git-send-email, I've seen that there's no aliases support > >> when manually adding a recipient in a 'To' o

[RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Remi LESPINET
Hi, Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in a 'To' or 'Cc' field in a patch and for the --to-cmd and --cc-cmd. I would like to add this support, and I wonder if there are reasons not to do it. Thanks. -- To unsubscribe from this l

[PATCH/RFC v4 1/3] git-am.sh: fix initialization of the threeway variable

2015-06-04 Thread Remi Lespinet
Initialization for the threeway variable was missing. This caused a behavior change for command lines like: threeway=t git am ... This commit adds initialization for this variable. Signed-off-by: Remi Lespinet --- git-am.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-am.sh

[PATCH/RFC v4 2/3] t4150-am: refactor am -3 tests

2015-06-04 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet --- t/t4150-am.sh | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions

[PATCH/RFC v4 3/3] git-am: add am.threeWay config variable

2015-06-04 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet --- Documentation/config.txt | 8

Re: [PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-04 Thread Remi Lespinet
> Matthieu Moy writes > > > +CONFIGURATION > > > +- > > > + > > > +am.keepcr:: > > > +If true, git-am will call git-mailsplit for patches in mbox > > > format > > > > `git am` > > `git mailsplit` > > > > > +with parameter '--keep-cr'. In this case git-mailsplit will >

Re: [PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-03 Thread Remi Lespinet
Matthieu Moy writes > Most git-*.txt do not have this CONFIGURATION section. > > In an ideal world, we would have such section automatically generated > (i.e. the description for each variable would exist in one place, and we > would make sure that both "man git-config" and "man git-" show > it

[PATCH/RFC v3 4/4] git-am: add am.threeWay config variable

2015-06-03 Thread Remi Lespinet
Matthieu Moy writes > Remi Lespinet writes: > > > +am.threeWay:: > > +By default, git-am will fail if the patch does not apply cleanly. > > http://article.gmane.org/gmane.comp.version-control.git/270538 Ok sorry. Thanks -- To unsubscribe from this list: se

[PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-03 Thread Remi Lespinet
> On 06/03/2015 07:50 AM Torsten Bögershausen wrote > > > +CONFIGURATION > > +- > > + > > +am.keepcr:: > > +If true, git-am will call git-mailsplit for patches in mbox format > > +with parameter '--keep-cr'. In this case git-mailsplit will > > +not remove `\r` f

[PATCH/RFC v3 3/4] t4150-am: refactor am -3 tests

2015-06-02 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet --- t/t4150-am.sh | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions

[PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-02 Thread Remi Lespinet
be used in the next commit. Signed-off-by: Remi Lespinet --- Documentation/git-am.txt | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 0d8ba48..d412f6b 100644 --- a/Documentation/git-am.txt +++ b

[PATCH/RFC v3 4/4] git-am: add am.threeWay config variable

2015-06-02 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet --- Even if git am will be rewritten soon, the

[PATCH/RFC v3 1/4] git-am.sh: fix initialization of the threeway variable

2015-06-02 Thread Remi Lespinet
Initialization for the threeway variable was missing. This caused a behavior change for command lines like: threeway=t git am ... This commit fixes the bug. Signed-off-by: Remi Lespinet --- git-am.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-am.sh b/git-am.sh index

[PATCH/RFC v2 2/2] git-am: add am.threeWay config variable

2015-06-02 Thread Remi LESPINET
Matthieu Moy writes: > Remi Lespinet writes: > > > +if test "$(git config --bool --get am.threeWay)" = true > > +then > > +threeway=t > > +fi > > I think you missed Paul's remark on this: > > http://article.gmane.org/gmane.comp.versi

[PATCH/RFC v2 1/2] t4150-am: refactor am -3 tests

2015-06-02 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet --- I removed the function creating temporary branch for now, because this would have cost too much time

[PATCH/RFC v2 2/2] git-am: add am.threeWay config variable

2015-06-02 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet --- Documentation/config.txt | 7

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Remi Lespinet
Ok, Thanks for all the informations > Notice that the pre-context lines in this second example is only one > line. Is it giving the same degree of safety if we rejected an > attempt to apply this patch only when the original does not have 10, > 20, 30 and 40 in this order? > > No. Because we ar

[RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Remi LESPINET
== = 1. The bug == hunks of the form: @@ -1,k +n,m @@ have a special behavior because of the variable match_begining. For these hunks, offset is not allowed w

[PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-01 Thread Remi Lespinet
mitation imposed by 79ee555b (Check and document the options to prevent mistakes, 2006-06-21) which rejected every argument with comma in --cc, --to and --bcc Helped-by: Remi Lespinet Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia Signed-off-by: Matthie

[PATCH 1/2] t9001-send-email: create a function replacing variable fields

2015-06-01 Thread Remi Lespinet
mit which uses this function Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index a3663da..71968ee 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh

[PATCH/RFC] send-email: allow multiple emails using --cc --to and --bcc

2015-05-29 Thread Remi LESPINET
Eric Sunshine writes: > wrote: > > validate_address_list(sanitize_address_list( > split_address_list(@xx)) > > That's pretty verbose, so introducing a new function to encapsulates > that behavior might be reasonable. Agreed, If you have any suggestion for the name of this function

[PATCH/RFC] send-email: allow multiple emails using --cc --to and --bcc

2015-05-29 Thread Remi LESPINET
Junio C Hamano writes: > Remi Lespinet writes: > Accept a list of emails separated by commas in flags --cc, --to > and --bcc. Multiple addresses can already be given by using > these options multiple times, but it is more convenient to allow > cutting-and-pa

[PATCH 1/3] t4150-am: refactor and clean common setup

2015-05-29 Thread Remi LESPINET
Eric Sunshine writes: > Paul Tan writes: > > >> Remi LESPINET writes: > >> + tmp_name=${2-"temporary"} > > > > I don't think the quotes are required. Also, I don't feel good about > > swapping the order of the arguments to

[PATCH/RFC] send-email: allow multiple emails using --cc --to and --bcc

2015-05-28 Thread Remi Lespinet
to='Foo, Bar ' This artificial limitation is imposed by 79ee555b (Check and document the options to prevent mistakes, 2006-06-21). Signed-off-by: Mathieu Lienard--Mayor Signed-off-by: Jorge Juan Garcia Garcia Signed-off-by: Matthieu Moy Contributions-by: Remi Lespinet --- Documen

[PATCH/RFC] send-email: allow multiple emails using --cc --to and --bcc

2015-05-28 Thread Remi Lespinet
Hello, I've corrected an old patch from an Ensimag student. (http://thread.gmane.org/gmane.comp.version-control.git/228182). This patch allows multiple email addresses for options --cc, --to and --bcc. As said in the commit message, this patch doesn't handle commas in name, and the only possibilit

[PATCH 2/3] t4150-am: refactor am -3 tests

2015-05-26 Thread Remi Lespinet
Move the creation of the file, commit and branch used in git am -3 tests in a setup test, to avoid creating this setup several time. Signed-off-by: Remi Lespinet --- t/t4150-am.sh | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/t/t4150-am.sh b/t/t4150

[PATCH 3/3] git-am: add am.threeWay config variable

2015-05-26 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet --- Even if git am will be rewritten soon, the

[PATCH 1/3] t4150-am: refactor and clean common setup

2015-05-26 Thread Remi Lespinet
Add new functions to keep the setup cleaner: - setup_temporary_branch: creates a new branch, check it out and automatically delete it after the test is over - setup_fixed_branch: creates a fixed branch, which can be re-used in later tests Signed-off-by: Remi Lespinet --- t/t4150-am.sh