Skip to contentSkip to conversation

git send-email suppress-cc=self fixes

PATCH In review Michael S. Tsirkin 3 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

v4 cover git send-email suppress-cc=self fixes

This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included.

Changes from v3:
- v3 submission was missing one patch (1/7). Re-add it.
Changes from v2:
- add a new test, split patches differently add code comments to address 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-email: test suppress-cc=self on cccmd
send-email: make --suppress-cc=self sanitize input t/send-email: add test with quoted sender t/send-email: test suppress-cc=self with non-ascii
test-send-email: test for pre-sanitized self name

 git-send-email.perl   | 23 ++++++++++------
 t/t9001-send-email.sh | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 8 deletions(-)
Signature · 1 line
MST
#1 lore raw
Quoted 11 lines · Michael S. Tsirkin

This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included.

Changes from v3:
- v3 submission was missing one patch (1/7). Re-add it.
Changes from v2:
- add a new test, split patches differently add code comments to address 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

Nice. This round cleanly applies and the interdiff since v2 looked sensible.

Will replace and merge to 'next' shortly.

Thanks.

Quoted 13 lines

Michael S. Tsirkin (7):
t/send-email.sh: add test for suppress-cc=self
send-email: fix suppress-cc=self on cccmd t/send-email: test suppress-cc=self on cccmd
send-email: make --suppress-cc=self sanitize input t/send-email: add test with quoted sender t/send-email: test suppress-cc=self with non-ascii
test-send-email: test for pre-sanitized self name

 git-send-email.perl   | 23 ++++++++++------
 t/t9001-send-email.sh | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 8 deletions(-)
#2 lore raw
Quoted 14 lines · Junio C Hamano
Quoted 11 lines · Michael S. Tsirkin

This includes bugfixes related to handling of --suppress-cc=self flag. Tests are also included.

Changes from v3:
- v3 submission was missing one patch (1/7). Re-add it.
Changes from v2:
- add a new test, split patches differently add code comments to address 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

Quoted 6 lines

Nice. This round cleanly applies and the interdiff since v2 looked sensible.

Will replace and merge to 'next' shortly.

Thanks.

Wellcome.

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 if there
# otherwise I get two copies of patches if I renamed any
git branch|fgrep '*'
# Figure out on which branch I am, manually specify the correct upstream I'm tracking, # otherwise I get a ton of unrelated patches.
git format-patch --cover --subject-prefix='PATCH vN' -o patchvN origin/master..

vi patchvN/0000* patchvN-1/0000*

#manually copy subject, Cc list and text from vN-1 to vN cover letter, #leave stats intact.

git log origin/master.. |grep -e Cc: -e Reviewed -e Acked # manually Look who reviewed/acked all patches in previous versions - # if so copy them on cover letter too.

git send-email --cc=junio patchvN/*

lots of manual steps here.
Any ways to automate?

Quoted 13 lines
Quoted 13 lines

Michael S. Tsirkin (7):
t/send-email.sh: add test for suppress-cc=self
send-email: fix suppress-cc=self on cccmd t/send-email: test suppress-cc=self on cccmd
send-email: make --suppress-cc=self sanitize input t/send-email: add test with quoted sender t/send-email: test suppress-cc=self with non-ascii
test-send-email: test for pre-sanitized self name

 git-send-email.perl   | 23 ++++++++++------
 t/t9001-send-email.sh | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 8 deletions(-)
#3 lore raw
Quoted 7 lines · Michael S. Tsirkin

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 if there
# otherwise I get two copies of patches if I renamed any

Not needed with recent "git format-patch -v4" option.

Quoted 3 lines

git branch|fgrep '*'
# Figure out on which branch I am, manually specify the correct upstream I'm tracking, # otherwise I get a ton of unrelated patches.

git-prompt with PS1 you do not need this either.

Quoted 1 line

git format-patch --cover --subject-prefix='PATCH vN' -o patchvN origin/master..

Again, "git format-patch -v4 -o mt-send-email" will deposit the new ones alongside the older round.

Quoted 1 line
	vi patchvN/0000* patchvN-1/0000*

Same (i.e. "vi mt-send-email/v*-0000-*.txt).

#4 lore raw
Quoted 11 lines · Junio C Hamano
Quoted 7 lines · Michael S. Tsirkin

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 if there
# otherwise I get two copies of patches if I renamed any

Not needed with recent "git format-patch -v4" option.

Unless I rerun with same vX :(
Would it make sense for it to check for vX existance and fail? Same without -vX, when 000X exists ...
Could be an option.

Quoted 5 lines
Quoted 3 lines

git branch|fgrep '*'
# Figure out on which branch I am, manually specify the correct upstream I'm tracking, # otherwise I get a ton of unrelated patches.

git-prompt with PS1 you do not need this either.

grep serves just as well but
I still need to copy it to the next line manually...

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?
I tried fgrep '{}' Documentation/*txt and it only returned git-show-ref.txt which isn't really informative ...

Additionally, or alternatively, would it make sense for git format-patch to format the diff against the tracking branch by default?

Quoted 8 lines
Quoted 1 line

git format-patch --cover --subject-prefix='PATCH vN' -o patchvN origin/master..

Again, "git format-patch -v4 -o mt-send-email" will deposit the new ones alongside the older round.

Quoted 1 line
	vi patchvN/0000* patchvN-1/0000*

Same (i.e. "vi mt-send-email/v*-0000-*.txt).

I still need to copy subject, Cc list and blurb to the next line manually. Now that there's a concept of revisions,
maybe git format-patch -v4 could copy the text
and subject from v3?

Signature · 1 line
MST
#5 lore raw
Quoted 3 lines · Michael S. Tsirkin

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?

gitrevisions(7) is what you're looking for here.

In this case I think you want '@{upstream}' or its short form '@{u}'.

Quoted 2 lines

I tried fgrep '{}' Documentation/*txt and it only returned git-show-ref.txt which isn't really informative ...

'{' and '}' need to be escaped in AsciiDoc so you have to grep for '\\{\\}'.

#7 lore raw
In reply to Michael S. Tsirkin
Quoted 6 lines · Michael S. Tsirkin
Quoted 1 line

Not needed with recent "git format-patch -v4" option.

Unless I rerun with same vX :(
Would it make sense for it to check for vX existance and fail? Same without -vX, when 000X exists ...
Could be an option.

Oh, instead of exact -v$N, trigger it with "-v auto" or something? Sounds like a good addition.

And instead of ***BLURBHERE*** placeholder, text from old round could be copied as a new placeholder. I do not offhand think that needs much thought about compatibility but maybe there are people who trained their editors or scripts to find the known placeholder string and edit it? I dunno. It certainly sounds like a sensible thing to do to carry as much information forward from the older round if/when we know which one corresponds to which.

Discussions and patches welcome.

Quoted 11 lines
Quoted 5 lines
Quoted 3 lines

git branch|fgrep '*'
# Figure out on which branch I am, manually specify the correct upstream I'm tracking, # otherwise I get a ton of unrelated patches.

git-prompt with PS1 you do not need this either.

grep serves just as well but
I still need to copy it to the next line manually...

I vaguely remember there was some way to say
"head of the remote I am tracking" - but I could not find it.

Do you mean @{upstream}?

Quoted 1 line

Where are all the tricks like foo^{} documented?

Documentation/revisions.txt?

Quoted 2 lines

Additionally, or alternatively, would it make sense for git format-patch to format the diff against the tracking branch by default?

Meaning "git format-patch @{u}" without saying anything about @{u}? I am not sure if we want to go that far, but it certainly is worth a thought.

#6 lore raw
In reply to John Keeping
Quoted 6 lines · John Keeping
Quoted 3 lines · Michael S. Tsirkin

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?

gitrevisions(7) is what you're looking for here.

I see. And git(1) actually points to it.
Thanks!

Quoted 7 lines

In this case I think you want '@{upstream}' or its short form '@{u}'.

Quoted 2 lines

I tried fgrep '{}' Documentation/*txt and it only returned git-show-ref.txt which isn't really informative ...

'{' and '}' need to be escaped in AsciiDoc so you have to grep for '\\{\\}'.