[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 myself,

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 22

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

2015-06-23 Thread Remi Lespinet
. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 2 +- perl/Git.pm | 67 t/t9000-addresses.sh | 30 +++ t/t9000/test.pl | 67

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62

[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 remi.lespi

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions

[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 j...@example.com as: Jane Doe j...@example.com instead of: Jane\ \Doe j...@example.com Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-send

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 1

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

2015-06-23 Thread Remi Lespinet
argument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr Signed-off-by: Mathieu Lienard--Mayor mathieu.lienard--ma...@ensimag.imag.fr Signed-off-by: Jorge Juan Garcia Garcia jorge-juan.garcia-gar...@ensimag.imag.fr Signed-off-by: Matthieu Moy

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

2015-06-23 Thread Remi LESPINET
Matthieu Moy matthieu@grenoble-inp.fr 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

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

2015-06-23 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

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

2015-06-21 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 1

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

2015-06-21 Thread Remi Lespinet
argument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr Signed-off-by: Mathieu Lienard--Mayor mathieu.lienard--ma...@ensimag.imag.fr Signed-off-by: Jorge Juan Garcia Garcia jorge-juan.garcia-gar...@ensimag.imag.fr Signed-off-by: Matthieu Moy

[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 j...@example.com as: Jane Doe j...@example.com instead of: Jane\ \Doe j...@example.com Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-send

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-send

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions

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

2015-06-20 Thread Remi Lespinet
. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- I've added the function in Git.pm as suggested. I've also added a test named t9000-addresses.sh (I've read the README to name tests but I'm not sure about the name of this test). I made a separated test (t9000-addresses.sh) because

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[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 remi.lespi

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 22

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

2015-06-18 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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);

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

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

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

2015-06-17 Thread Remi Lespinet
Junio C Hamano gits...@pobox.com 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.?

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions

[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 remi.lespi

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 22

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 1

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

2015-06-17 Thread Remi Lespinet
argument with comma in --cc, --to and --bcc. Helped-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr Signed-off-by: Mathieu Lienard--Mayor mathieu.lienard--ma...@ensimag.imag.fr Signed-off-by: Jorge Juan Garcia Garcia jorge-juan.garcia-gar...@ensimag.imag.fr Signed-off-by: Matthieu Moy

[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 j...@example.com as: Jane Doe j...@example.com instead of: Jane\ \Doe j...@example.com Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- I don't know

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-send

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

2015-06-17 Thread Remi Lespinet
. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 54 +++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index a0cd7ff..a1f6c18 100755 --- a/git-send

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

2015-06-17 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr 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

[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 j...@example.com This changes the behavior of the double quote. For example when

[RFC] send-email quote issues

2015-06-15 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

[RFC] send-email quote issues

2015-06-15 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

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

2015-06-10 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

[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 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr 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 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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9

[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

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

2015-06-09 Thread Remi Lespinet
send-email prompt. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- 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

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

2015-06-09 Thread Remi Lespinet
as an argument of --from is not possible, but modifying the from field in the patch manually is. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 2 ++ t/t9001-send-email.sh | 60 +++ 2 files changed, 62

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

2015-06-09 Thread Remi Lespinet
-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- 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

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

2015-06-09 Thread Remi Lespinet
: $ git send-email --to='Jane, Doe j...@example.com' 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 remi.lespi...@ensimag.grenoble-inp.fr Signed-off

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git

[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.comor \t j...@example.com as with j...@example.com. The next commit will introduce a test for this aswell. Signed-off-by: Remi Lespinet

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

2015-06-08 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

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

2015-06-08 Thread Remi Lespinet
Junio C Hamano gits...@pobox.com writes Matthieu Moy matthieu@grenoble-inp.fr writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: Simplify code by creating a function to transform list of email lists (comma separated, with aliases ...) into a simple list of valid

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

2015-06-08 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr 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

[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 remi.lespi...@ensimag.grenoble-inp.fr --- I'm not sure about the name of the function... git-send-email.perl | 28

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

2015-06-06 Thread Remi Lespinet
-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- 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

[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 remi.lespi...@ensimag.grenoble-inp.fr --- 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

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

2015-06-06 Thread Remi Lespinet
: $ git send-email --to='Jane, Doe j...@example.com' 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 remi.lespi...@ensimag.grenoble-inp.fr Signed-off

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-am.sh | 1 + 1 file changed, 1

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t4150-am.sh | 32 ++-- 1 file

[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 remi.lespi...@ensimag.grenoble-inp.fr --- Only one

[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 remi.lespi...@ensimag.grenoble-inp.fr 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. I would like to add

[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 sbel...@google.com wrote: On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: 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

[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 remi.lespi...@ensimag.grenoble-inp.fr

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-am.sh | 1 + 1 file changed, 1

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t4150-am.sh | 32 ++-- 1 file

[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

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

2015-06-04 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

[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 tbo...@web.de 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`

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

2015-06-03 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr 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

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

2015-06-03 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr 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

[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 remi.lespi...@ensimag.grenoble-inp.fr

[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 remi.lespi...@ensimag.grenoble-inp.fr --- I removed the function creating temporary branch for now, because

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

2015-06-02 Thread Remi LESPINET
Matthieu Moy matthieu@grenoble-inp.fr writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr 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.version

[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 remi.lespi...@ensimag.grenoble-inp.fr --- Even

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

2015-06-02 Thread Remi Lespinet
will be used in the next commit. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- 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

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t4150-am.sh | 32 ++-- 1 file

[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 remi.lespi...@ensimag.grenoble-inp.fr --- git-am.sh | 1 + 1 file changed, 1 insertion(+) diff

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

2015-06-01 Thread Remi Lespinet
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 remi.lespi...@ensimag.grenoble-inp.fr Signed-off-by: Mathieu Lienard--Mayor mathieu.lienard--ma...@ensimag.imag.fr Signed

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

2015-06-01 Thread Remi Lespinet
this function Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- 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

[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

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 are

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

2015-05-29 Thread Remi LESPINET
Eric Sunshine sunsh...@sunshineco.com writes: Paul Tan pyoka...@gmail.com writes: Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr 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 git

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

2015-05-29 Thread Remi LESPINET
Eric Sunshine sunsh...@sunshineco.com writes: remi.lespi...@ensimag.grenoble-inp.fr 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

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

2015-05-29 Thread Remi LESPINET
Junio C Hamano gits...@pobox.com writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr 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

[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

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

2015-05-28 Thread Remi Lespinet
jorge-juan.garcia-gar...@ensimag.imag.fr Signed-off-by: Matthieu Moy matthieu@grenoble-inp.fr Contributions-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- Documentation/git-send-email.txt | 23 ++ git-send-email.perl | 21 ++-- t

[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 remi.lespi

[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 remi.lespi...@ensimag.grenoble-inp.fr --- Even

[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 remi.lespi...@ensimag.grenoble-inp.fr --- t/t4150-am.sh | 18 ++ 1 file changed, 6 insertions(+), 12 deletions