[PATCH v4 4/6] patch-id: make it stable against hunk reordering

2014-04-23 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin m...@redhat.com --- builtin/patch-id.c | 94 -- 1 file changed, 78 insertions(+), 16 deletions(-) diff --git a/builtin/patch-id.c b/builtin/patch-id.c index 3cfe02d..e154405 100644 --- a/builtin/patch-id.c +++ b/builtin/patch

[PATCH v4 5/6] patch-id: document new behaviour

2014-04-23 Thread Michael S. Tsirkin
Clarify that patch ID can now be a sum of hashes, not a hash. Document how command line and config options affect the behaviour. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/git-patch-id.txt | 25 - 1 file changed, 20 insertions(+), 5 deletions

[PATCH v4 6/6] patch-id-test: test stable and unstable behaviour

2014-04-23 Thread Michael S. Tsirkin
Verify that patch ID supports an algorithm that is stable against diff split and reordering. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t4204-patch-id.sh | 140 +++- 1 file changed, 129 insertions(+), 11 deletions(-) diff --git a/t

[PATCH v4 3/6] tests: new test for orderfile options

2014-04-23 Thread Michael S. Tsirkin
The test is very basic and can be extended. Couldn't find a good existing place to put it, so created a new file. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t4056-diff-order.sh | 63 +++ 1 file changed, 63 insertions(+) create mode

[PATCH v4 2/6] test: add test_write_lines helper

2014-04-23 Thread Michael S. Tsirkin
As suggested by Junio. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/test-lib-functions.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index aeae3ca..2fa6453 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib

Re: [PATCH v4 4/6] patch-id: make it stable against hunk reordering

2014-04-23 Thread Michael S. Tsirkin
On Wed, Apr 23, 2014 at 10:39:23AM -0700, Junio C Hamano wrote: Are these three patches the same as what has been queued on mt/patch-id-stable topic and cooking in 'next' for a few weeks? Not exactly - at your request I implemented git config options to control patch id behaviour. Documentation

Re: [PATCH v4 3/6] tests: new test for orderfile options

2014-04-23 Thread Michael S. Tsirkin
On Wed, Apr 23, 2014 at 10:38:07AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: The test is very basic and can be extended. Couldn't find a good existing place to put it, so created a new file. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t

[PATCH v2 2/2] test/send-email: add to-cover test

2014-04-03 Thread Michael S. Tsirkin
Does it work? I am not sure. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 16 1 file changed, 16 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 3119c8c..3b17884 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001

[PATCH v2 1/2] git-send-email: two new options: to-cover, cc-cover

2014-04-03 Thread Michael S. Tsirkin
Allow extracting To/Cc addresses from cover letter. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/git-send-email.txt | 12 git-send-email.perl | 16 2 files changed, 28 insertions(+) diff --git a/Documentation/git-send-email.txt b

Re: [PATCH v3 2/3] patch-id: document new behaviour

2014-04-02 Thread Michael S. Tsirkin
On Wed, Apr 02, 2014 at 11:18:26AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Mar 31, 2014 at 12:54:46PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: The hash used is mostly an internal implementation detail, isn't

Re: [PATCH v3 1/3] patch-id: make it stable against hunk reordering

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 10:59:50AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Patch id changes if users 1. reorder file diffs that make up a patch or 2. split a patch up to multiple diffs that touch the same path (keeping hunks within a single diff ordered

Re: [PATCH v3 2/3] patch-id: document new behaviour

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 12:54:46PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: The hash used is mostly an internal implementation detail, isn't it? Yes, but that does not mean we can break people who keep an external database indexed with the patch-id

Re: [PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-30 Thread Michael S. Tsirkin
On Fri, Mar 28, 2014 at 12:20:13PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Patch id changes if you reorder hunks in a diff. As the result is functionally equivalent, this is surprising to many people. In particular, reordering hunks is helpful to make

[PATCH v3 1/3] patch-id: make it stable against hunk reordering

2014-03-30 Thread Michael S. Tsirkin
flag --unstable to get the historical behaviour. Add --stable which is a nop, for symmetry. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- changes from v2: several bugfixes changes from v1: hanges from v1: documented motivation for supporting diff splitting

[PATCH v3 2/3] patch-id: document new behaviour

2014-03-30 Thread Michael S. Tsirkin
Clarify that patch ID is now a sum of hashes, not a hash. Document --stable and --unstable flags. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- changes from v2: explicitly list the kinds of changes against which patch ID is stable Documentation/git-patch-id.txt | 23

[PATCH v2 3/3] patch-id-test: test new --stable and --unstable flags

2014-03-28 Thread Michael S. Tsirkin
Verify that patch ID is now stable against hunk reordering. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- changes from v1: Use -\EOF to address comment by Eric Sunshine t/t4204-patch-id.sh | 68 + 1 file changed, 63 insertions

[PATCH v2 2/3] patch-id: document new behaviour

2014-03-28 Thread Michael S. Tsirkin
Clarify that patch ID is now a sum of hashes, not a hash. Document --stable and --unstable flags. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- No change from v1. Documentation/git-patch-id.txt | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git

[PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-28 Thread Michael S. Tsirkin
to get the historical behaviour. Add --stable which is a nop, for symmetry. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v1: documented motivation for supporting hunk reordering (and not just file reordering). No code changes. Junio, you didn't respond so I'm not sure

[PATCH 3/3] patch-id-test: test new --stable and --unstable flags

2014-03-27 Thread Michael S. Tsirkin
Verify that patch ID is now stable against hunk reordering. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t4204-patch-id.sh | 68 + 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/t/t4204-patch-id.sh b/t/t4204-patch

[PATCH 2/3] patch-id: document new behaviour

2014-03-27 Thread Michael S. Tsirkin
Clarify that patch ID is now a sum of hashes, not a hash. Document --stable and --unstable flags. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/git-patch-id.txt | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Documentation/git

[PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Michael S. Tsirkin
against hunk reodering: - prepend header to each hunk (if not there) - calculate SHA1 hash for each hunk separately - sum all hashes to get patch id Add a new flag --unstable to get the historical behaviour. Add --stable which is a nop, for symmetry. Signed-off-by: Michael S

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Michael S. Tsirkin
On Thu, Mar 27, 2014 at 09:58:41AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Patch id changes if you reorder hunks in a diff. If you reorder hunks, the patch should no longer apply [*1*], so a feature to make patch-id stable across such move would have

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Michael S. Tsirkin
On Thu, Mar 27, 2014 at 09:58:41AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Patch id changes if you reorder hunks in a diff. If you reorder hunks, the patch should no longer apply [*1*], so a feature to make patch-id stable across such move would have

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Michael S. Tsirkin
On Thu, Mar 27, 2014 at 11:03:46AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: I started to remove that code, but then I recalled why I did it like this. There is a good reason. Yes, you can't simply reorder hunks just like this. But you can get the same

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Michael S. Tsirkin
On Thu, Mar 27, 2014 at 08:39:17PM +0200, Michael S. Tsirkin wrote: On Thu, Mar 27, 2014 at 11:03:46AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: I started to remove that code, but then I recalled why I did it like this. There is a good reason. Yes, you

[PATCH] git-send-email: two new options: to-cover, cc-cover

2013-10-02 Thread Michael S. Tsirkin
Allow extracting To/Cc addresses from cover letter. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Is there interest in this kind of feature? I find it easier than adding --cc to send-email command line. git-send-email.perl | 16 1 file changed, 16 insertions(+) diff

fast-forwarding tags

2013-09-25 Thread Michael S. Tsirkin
Hi! Linus favors one-time use signed tags, e.g. for_linus. Unfortunately if I push to such a tag without -f, I get an error (already exists). Would it make sense for there to be an option that makes it behave like a head, and allow fast-forward? -- MST -- To unsubscribe from this list: send the

Re: [PATCH] diff: add a config option to control orderfile

2013-09-24 Thread Michael S. Tsirkin
On Tue, Sep 24, 2013 at 12:36:10PM -0700, Jonathan Nieder wrote: Michael S. Tsirkin wrote: On Mon, Sep 23, 2013 at 02:37:29PM -0700, Jonathan Nieder wrote: a) When asked to compute the patch-id of a seekable file, use the current streaming implementation until you notice a filename

Re: [PATCH] diff: add a config option to control orderfile

2013-09-24 Thread Michael S. Tsirkin
On Tue, Sep 24, 2013 at 02:31:16PM -0700, Jonathan Nieder wrote: Michael S. Tsirkin wrote: On Mon, Sep 23, 2013 at 02:37:29PM -0700, Jonathan Nieder wrote: Then start over with sorted hunks (for example building a table of offsets within the patch for each hunk

[PATCH] doc: don't claim that cherry-pick calls patch-id

2013-09-24 Thread Michael S. Tsirkin
The id is already different for binary files. Let's document that they are similar, not identical. Cc: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/git-cherry.txt | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] doc: don't claim that cherry-pick calls patch-id

2013-09-24 Thread Michael S. Tsirkin
On Tue, Sep 24, 2013 at 03:14:09PM -0700, Jonathan Nieder wrote: Michael S. Tsirkin wrote: Subject: [PATCH] doc: don't claim that cherry-pick calls patch-id s/cherry-pick/cherry/ The id is already different for binary files. Let's document that they are similar, not identical

[PATCH v2] doc: don't claim that cherry calls patch-id

2013-09-24 Thread Michael S. Tsirkin
The id is already different for binary files. The hash used is an implementation detail, so let's just document how diffs are compared. Cc: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v1: address comments by Jonathan

Re: [PATCH] doc: don't claim that cherry-pick calls patch-id

2013-09-24 Thread Michael S. Tsirkin
On Tue, Sep 24, 2013 at 03:44:31PM -0700, Jonathan Nieder wrote: Michael S. Tsirkin wrote: On Tue, Sep 24, 2013 at 03:14:09PM -0700, Jonathan Nieder wrote: Michael S. Tsirkin wrote: -The commits are compared with their 'patch id', obtained from -the 'git patch-id' program. +The diffs

Re: [PATCH] doc: don't claim that cherry-pick calls patch-id

2013-09-24 Thread Michael S. Tsirkin
On Tue, Sep 24, 2013 at 03:53:56PM -0700, Jonathan Nieder wrote: Michael S. Tsirkin wrote: See v2 that I sent, maybe that's clear enough. Yep, looks sensible. Thanks. OK, ack that please :) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

Re: [PATCH] diff: add a config option to control orderfile

2013-09-23 Thread Michael S. Tsirkin
On Fri, Sep 20, 2013 at 12:32:26AM +0300, Michael S. Tsirkin wrote: On Tue, Sep 17, 2013 at 04:56:16PM -0400, Jeff King wrote: On Tue, Sep 17, 2013 at 11:38:07PM +0300, Michael S. Tsirkin wrote: A problem with both schemes, though, is that they are not backwards-compatible

Re: [PATCH] diff: add a config option to control orderfile

2013-09-23 Thread Michael S. Tsirkin
On Mon, Sep 23, 2013 at 02:37:29PM -0700, Jonathan Nieder wrote: Hi, Michael S. Tsirkin wrote: On Tue, Sep 17, 2013 at 04:56:16PM -0400, Jeff King wrote: A problem with both schemes, though, is that they are not backwards-compatible with existing git-patch-id implementations

Re: [PATCH] diff: add a config option to control orderfile

2013-09-21 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 10:24:19AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: So might it not be useful to tweak patch id to sort the diff, making it a bit more stable? That is one thing that needs to be done, I think. But it would be unfortunate if we have

Re: [PATCH] diff: add a config option to control orderfile

2013-09-19 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 04:56:16PM -0400, Jeff King wrote: On Tue, Sep 17, 2013 at 11:38:07PM +0300, Michael S. Tsirkin wrote: A problem with both schemes, though, is that they are not backwards-compatible with existing git-patch-id implementations. Could you clarify? We never send

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 09:26:13AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Actually, after I've looked at the code, diffcore_order is already already called for patch-id. That was a band-aid for an ill-thought-out orderfile misfeature to hide the breakage

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 10:24:19AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: So might it not be useful to tweak patch id to sort the diff, making it a bit more stable? That is one thing that needs to be done, I think. But it would be unfortunate if we have

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 11:06:07AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, Sep 17, 2013 at 10:24:19AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: So might it not be useful to tweak patch id to sort the diff, making

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 11:06:07AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, Sep 17, 2013 at 10:24:19AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: So might it not be useful to tweak patch id to sort the diff, making

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 11:14:01PM +0300, Michael S. Tsirkin wrote: On Tue, Sep 17, 2013 at 11:06:07AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, Sep 17, 2013 at 10:24:19AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 04:18:28PM -0400, Jeff King wrote: On Tue, Sep 17, 2013 at 11:16:04PM +0300, Michael S. Tsirkin wrote: Thinking about it some more, it's a best effort thing anyway, correct? So how about, instead of doing a hash over the whole input, we hash each chunk

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 11:38:07PM +0300, Michael S. Tsirkin wrote: On Tue, Sep 17, 2013 at 04:18:28PM -0400, Jeff King wrote: On Tue, Sep 17, 2013 at 11:16:04PM +0300, Michael S. Tsirkin wrote: Thinking about it some more, it's a best effort thing anyway, correct? So how

Re: [PATCH] diff: add a config option to control orderfile

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 04:56:16PM -0400, Jeff King wrote: On Tue, Sep 17, 2013 at 11:38:07PM +0300, Michael S. Tsirkin wrote: A problem with both schemes, though, is that they are not backwards-compatible with existing git-patch-id implementations. Could you clarify? We never send

Re: [PATCH] diff: add a config option to control orderfile

2013-09-15 Thread Michael S. Tsirkin
On Wed, Sep 04, 2013 at 12:08:15AM +0300, Michael S. Tsirkin wrote: On Tue, Sep 03, 2013 at 10:12:18AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: I always want my diffs to show header files first, then .c files, then the rest. Make it possible to set

Re: [PATCH] diff: add a config option to control orderfile

2013-09-15 Thread Michael S. Tsirkin
On Sun, Sep 15, 2013 at 10:49:00AM +0300, Michael S. Tsirkin wrote: On Wed, Sep 04, 2013 at 12:08:15AM +0300, Michael S. Tsirkin wrote: On Tue, Sep 03, 2013 at 10:12:18AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: I always want my diffs to show header

Re: [PATCH] git send-email: include [anything]-by: signatures

2013-09-04 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:39:05PM -0700, Junio C Hamano wrote: Jeff King p...@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

Re: [PATCH] git send-email: include [anything]-by: signatures

2013-09-03 Thread Michael S. Tsirkin
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

Re: [PATCH] git send-email: include [anything]-by: signatures

2013-09-03 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 10:06:19AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@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

Re: [PATCH] diff: add a config option to control orderfile

2013-09-03 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 10:12:18AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: I always want my diffs to show header files first, then .c files, then the rest. Make it possible to set orderfile though a config option to achieve this. Signed-off-by: Michael

Re: [PATCH] git send-email: include [anything]-by: signatures

2013-09-03 Thread Michael S. Tsirkin
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

Re: [PATCH] git send-email: include [anything]-by: signatures

2013-08-31 Thread Michael S. Tsirkin
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 m...@redhat.com Ping. Any opinion on whether this change is acceptable? --- git-send

[PATCH] diff: add a config option to control orderfile

2013-08-31 Thread Michael S. Tsirkin
I always want my diffs to show header files first, then .c files, then the rest. Make it possible to set orderfile though a config option to achieve this. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- diff.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diff.c b/diff.c index

[PATCH] git send-email: include [anything]-by: signatures

2013-08-26 Thread Michael S. Tsirkin
Consider [anything]-by: a valid signature. This includes Tested-by: Acked-by: Reviewed-by: etc. Signed-off-by: Michael S. Tsirkin m...@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

[PATCH v2 1/2] send-email: sanitize author when writing From line

2013-06-20 Thread Michael S. Tsirkin
...@ira.uka.de Signed-off-by: Michael S. Tsirkin m...@redhat.com --- git-send-email.perl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 671762b..ecbf56f 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1259,6

[PATCH v2 2/2] send-email: add test for duplicate utf8 name

2013-06-20 Thread Michael S. Tsirkin
Verify that author name is not duplicated if it matches sender, even if it is in utf8. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 14 ++ 1 file changed, 14 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 9f46f22

Re: [PATCH v2 2/2] send-email: add test for duplicate utf8 name

2013-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2013 at 02:41:37PM +0200, Thomas Rast wrote: Michael S. Tsirkin m...@redhat.com writes: Verify that author name is not duplicated if it matches sender, even if it is in utf8. Small nit: if you make two patches out of it, add the tests first with test_expect_failure

Re: [PATCH v2 2/2] send-email: add test for duplicate utf8 name

2013-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2013 at 02:48:15PM +0200, Thomas Rast wrote: Michael S. Tsirkin m...@redhat.com writes: On Thu, Jun 20, 2013 at 02:41:37PM +0200, Thomas Rast wrote: Michael S. Tsirkin m...@redhat.com writes: Verify that author name is not duplicated if it matches sender, even

Re: send-email adds redundant From: lines to message body

2013-06-18 Thread Michael S. Tsirkin
tree? Bisect points to: commit da18759e86bb1a7ee718c79a0c6cb15fbcbdf3c2 Author: Michael S. Tsirkin m...@redhat.com Date: 2013-06-05 21:11:00 +0300 send-email: make --suppress-cc=self sanitize input --suppress-cc=self fails to filter sender address in many cases where

Re: send-email adds redundant From: lines to message body

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 01:48:00PM +0200, SZEDER Gábor wrote: On Tue, Jun 18, 2013 at 02:42:07PM +0300, Michael S. Tsirkin wrote: On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote: Hi, 'git send-email' recently started to add redundant From: lines to my messages, see e.g

[PATCH 2/2] send-email: add test for duplicate utf8 name

2013-06-18 Thread Michael S. Tsirkin
Verify that author name is not duplicated if it matches sender, even if it is in utf8. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 13 + 1 file changed, 13 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 9f46f22

Re: send-email adds redundant From: lines to message body

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 01:48:00PM +0200, SZEDER Gábor wrote: On Tue, Jun 18, 2013 at 02:42:07PM +0300, Michael S. Tsirkin wrote: On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote: Hi, 'git send-email' recently started to add redundant From: lines to my messages, see e.g

[PATCH 1/2] send-email: sanitize author when writing From line

2013-06-18 Thread Michael S. Tsirkin
sender is now sanitized, but we didn't sanitize author when checking whether From: line is needed in the message body. As a result git started writing duplicate From lines when author matched sender and has utf8 characters. Reported-by: SZEDER Gábor sze...@ira.uka.de Signed-off-by: Michael S

Re: [PATCH v4 0/7] git send-email suppress-cc=self fixes

2013-06-10 Thread Michael S. Tsirkin
On Sun, Jun 09, 2013 at 04:25:11PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: With respect to this, and a bit off-topic, what's the best way to revise patch series? What I did, given series in patchvN-1/: rm -fr patchvN #blow away old directory

Re: [PATCH v4 0/7] git send-email suppress-cc=self fixes

2013-06-10 Thread Michael S. Tsirkin
On Mon, Jun 10, 2013 at 08:29:31AM +0100, John Keeping wrote: On Mon, Jun 10, 2013 at 09:53:24AM +0300, Michael S. Tsirkin wrote: I vaguely remember there was some way to say head of the remote I am tracking - but I could not find it. Where are all the tricks like foo^{} documented

[PATCH v4 0/7] git send-email suppress-cc=self fixes

2013-06-05 Thread Michael S. Tsirkin
comments by Junio - rename example addresses in tests from redhat.com to example.com Changes from v1: - tweak coding style in tests to address comments by Junio Michael S. Tsirkin (7): t/send-email.sh: add test for suppress-cc=self send-email: fix suppress-cc=self on cccmd t/send

[PATCH v3 3/6] send-email: make --suppress-cc=self sanitize input

2013-06-04 Thread Michael S. Tsirkin
--suppress-cc=self fails to filter sender address in many cases where it needs to be sanitized in some way, for example quoted: A U. Thor aut...@example.com To fix, make send-email sanitize both sender and the address it is compared against. Signed-off-by: Michael S. Tsirkin m...@redhat.com

[PATCH v3 6/6] test-send-email: test for pre-sanitized self name

2013-06-04 Thread Michael S. Tsirkin
Users can sanitize from address manually. Verify that these are suppressed properly. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 0d50fa7..38f407d 100755

[PATCH v3 1/6] send-email: fix suppress-cc=self on cccmd

2013-06-04 Thread Michael S. Tsirkin
When cccmd is used, old-style suppress-from filter is applied by the newer suppress-cc=self isn't. Fix this up. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- This makes one line a bit too long, but a follow-up patch fixes this up. git-send-email.perl | 2 +- 1 file changed, 1 insertion

[PATCH v3 4/6] t/send-email: add test with quoted sender

2013-06-04 Thread Michael S. Tsirkin
add test where sender address needs to be quoted. Make sure --suppress-cc=self works well in this case. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send

Re: [PATCH v3 0/6] git send-email suppress-cc=self fixes

2013-06-04 Thread Michael S. Tsirkin
On Tue, Jun 04, 2013 at 10:40:51AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included. Hmph, flipped the patches without test-applying first? No, I generated the patches

Re: [PATCH v2 4/6] send-email: make --suppress-cc=self sanitize input

2013-06-03 Thread Michael S. Tsirkin
On Mon, Jun 03, 2013 at 09:17:21AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: --suppress-cc=self fails to filter sender address in many cases where it needs to be sanitized in some way, for example quoted: A U. Thor aut...@example.com To fix, make send-email

Re: [PATCH v2 0/6] git send-email suppress-cc=self fixes

2013-06-03 Thread Michael S. Tsirkin
On Mon, Jun 03, 2013 at 09:18:56AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included. Thanks, will queue. OK pls let me know if this means you intend to handle the rest

Re: [PATCH v2 2/6] send-email: fix suppress-cc=self on cccmd

2013-06-03 Thread Michael S. Tsirkin
On Mon, Jun 03, 2013 at 11:04:31AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: What I tried to do here is split the changes to small chunks and I picked a chunk of a later patch in an earlier one by mistake. So this is fixed up by patch 4/6 in the series

[PATCH v2 0/6] git send-email suppress-cc=self fixes

2013-05-30 Thread Michael S. Tsirkin
This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included. Changes from v1: - tweak coding style in tests to address comments by Junio Michael S. Tsirkin (6): t/send-email.sh: add test for suppress-cc=self send-email: fix suppress-cc=self on cccmd

[PATCH v2 1/6] t/send-email.sh: add test for suppress-cc=self

2013-05-30 Thread Michael S. Tsirkin
This adds a basic test for --suppress-cc=self option of git send-email. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 43 +++ 1 file changed, 43 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index

[PATCH v2 2/6] send-email: fix suppress-cc=self on cccmd

2013-05-30 Thread Michael S. Tsirkin
When cccmd is used, old-style suppress-from filter is applied by the newer suppress-cc=self isn't. Fix this up. Signed-off-by: Michael S. Tsirkin m...@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

[PATCH v2 3/6] t/send-email: test suppress-cc=self on cccmd

2013-05-30 Thread Michael S. Tsirkin
Check that suppress-cc=self works when applied to output of cccmd. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index e1a7f3e..452b362 100755 --- a/t/t9001-send

[PATCH v2 4/6] send-email: make --suppress-cc=self sanitize input

2013-05-30 Thread Michael S. Tsirkin
--suppress-cc=self fails to filter sender address in many cases where it needs to be sanitized in some way, for example quoted: A U. Thor aut...@example.com To fix, make send-email sanitize both sender and the address it is compared against. Signed-off-by: Michael S. Tsirkin m...@redhat.com

[PATCH v2 5/6] t/send-email: add test with quoted sender

2013-05-30 Thread Michael S. Tsirkin
add test where sender address needs to be quoted. Make sure --suppress-cc=self works well in this case. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send

[PATCH v2 6/6] t/send-email: test suppress-cc=self with non-ascii

2013-05-30 Thread Michael S. Tsirkin
test suppress-cc=self when sender is non-acsii Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 42fb809..430e8de 100755 --- a/t/t9001-send-email.sh +++ b/t

Re: [PATCH 1/6] t/send-email.sh: add test for suppress self

2013-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2013 at 01:28:52PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Thanks. Thanks, I'll address your comments and repost. You asked some questions below, so I tried to answer. t/t9001-send

Re: [PATCH 1/6] t/send-email.sh: add test for suppress self

2013-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2013 at 03:59:51PM -0700, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: If we don't want to use \, this can also be done like this: FOO EOF BLABLA EOF BAR VAR I think this is what you suggest. Yup, that is exactly what I meant (but

[PATCH 0/6] git send-email suppress-cc=self fixes

2013-05-26 Thread Michael S. Tsirkin
This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included. -- MST -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/6] t/send-email.sh: add test for suppress self

2013-05-26 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 41 + 1 file changed, 41 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index ebd5c5d..36ecf73 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send

[PATCH 2/6] send-email: fix suppress-cc=self on cccmd

2013-05-26 Thread Michael S. Tsirkin
When cccmd is used, old-style suppress-from filter is applied by the newer suppress-cc=self isn't. Fix this up. Signed-off-by: Michael S. Tsirkin m...@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

[PATCH 3/6] t/send-email: test suppress-cc=self on cccmd

2013-05-26 Thread Michael S. Tsirkin
Check that suppress-cc=self works when applied to output of cccmd. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 50 +- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001

[PATCH 4/6] send-email: make --suppress-cc=self sanitize input

2013-05-26 Thread Michael S. Tsirkin
--suppress-cc=self fails to filter sender address in many cases where it needs to be sanitized in some way, for example quoted: A U. Thor aut...@example.com To fix, make send-email sanitize both sender and the address it is compared against. Signed-off-by: Michael S. Tsirkin m...@redhat.com

[PATCH 5/6] t/send-email: add test with quoted sender

2013-05-26 Thread Michael S. Tsirkin
add test where sender address needs to be quoted. Make sure --suppress-cc=self works well in this case. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 8aa55f8

[PATCH 6/6] t/send-email: test suppress-cc=self with non-ascii

2013-05-26 Thread Michael S. Tsirkin
test suppress-cc=self when sender is non-acsii Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t9001-send-email.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 0ab4056..66ebb1e 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001

push not resolving commit-ish?

2013-05-23 Thread Michael S. Tsirkin
Looks like push can't resolve tags to commits. Why is that? linux$ git push -f $PWD v3.10-rc2:refs/heads/vhost-next error: Trying to write non-commit object a8c6d53c4d84b3a5eb182758a9cdceceba4691da to branch refs/heads/vhost-next To /scm/linux ! [remote rejected] v3.10-rc2 - vhost-next (failed

Re: push not resolving commit-ish?

2013-05-23 Thread Michael S. Tsirkin
On Thu, May 23, 2013 at 01:53:10PM +0300, Michael S. Tsirkin wrote: Looks like push can't resolve tags to commits. Why is that? linux$ git push -f $PWD v3.10-rc2:refs/heads/vhost-next error: Trying to write non-commit object a8c6d53c4d84b3a5eb182758a9cdceceba4691da to branch refs/heads

[PATCH] git-send-email: fix handling of special characters

2013-05-23 Thread Michael S. Tsirkin
When patch sender's name has special characters, git send-email did not quote it before matching against the author name. As a result it would produce mail like this: Date: Thu, 23 May 2013 16:36:00 +0300 From: Michael S. Tsirkin m...@redhat.com To: qemu-de...@nongnu.org

[PATCH] git-send-email: another fix for special characters

2013-05-23 Thread Michael S. Tsirkin
When patch sender's name has special characters, git send-email did not quote it before matching against the author name. As a result suppress_cc = self did not work: sender is still Cc'd. Fix by sanitizing before matching to patch author name. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [PATCH v2] Document push --no-verify

2013-05-23 Thread Michael S. Tsirkin
On Thu, May 23, 2013 at 03:34:11PM +0200, Thomas Rast wrote: ec9 (push: Add support for pre-push hooks, 2013-01-13) forgot to add a note to git-push(1) about the new --no-verify option. Signed-off-by: Thomas Rast tr...@inf.ethz.ch Thanks. FWIW Reviewed-by: Michael S. Tsirkin m

Re: push not resolving commit-ish?

2013-05-23 Thread Michael S. Tsirkin
On Thu, May 23, 2013 at 11:10:32AM -0700, Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: On Thu, May 23, 2013 at 5:53 AM, Michael S. Tsirkin m...@redhat.com wrote: Looks like push can't resolve tags to commits. Why is that? linux$ git push -f $PWD v3.10-rc2

Re: push not resolving commit-ish?

2013-05-23 Thread Michael S. Tsirkin
On Thu, May 23, 2013 at 11:05:00AM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Looks like push can't resolve tags to commits. Why is that? How else would you push a tag out? Well my reaction is, it seems to figure out it needs a commit and then instead

Re: push not resolving commit-ish?

2013-05-23 Thread Michael S. Tsirkin
On Thu, May 23, 2013 at 11:10:32AM -0700, Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: On Thu, May 23, 2013 at 5:53 AM, Michael S. Tsirkin m...@redhat.com wrote: Looks like push can't resolve tags to commits. Why is that? linux$ git push -f $PWD v3.10-rc2

<    1   2   3   >