threads / patch / 19712

patch, 4 partsenhancements for the context menu of the Rev list

Subject: [PATCH QGit 0/4] enhancements for the context menu of the Rev list

## tl;dr

9 messages between Jun 6, 2009 and Jun 7, 2009. Diffs are folded; open one to read it.

replies: 8people: 3as markdown or json

Markus Heidelberg· Jun 6, 2009, 11:57 UTC · lore
Markus Heidelberg (4):
  Don't count the submenu entries for checking if it is empty
  Correctly count the entries in the revs context menu
  Avoid submenus with merely 1 entry
  Create a separate submenu for tags
 src/mainimpl.cpp |   51 +++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 39 insertions(+), 12 deletions(-)
Markus Heidelberg· Jun 6, 2009, 12:14 UTC · re: Markus Heidelberg · lore

Re: [PATCH QGit 0/4] enhancements for the context menu of the Rev list

Markus Heidelberg, 06.06.2009:
Show 5 quoted lines
> Markus Heidelberg (4):
>   Don't count the submenu entries for checking if it is empty
>   Correctly count the entries in the revs context menu
>   Avoid submenus with merely 1 entry
>   Create a separate submenu for tags
Hmm, no In-Reply-To in 1..4/4
I think I managed to do this earlier with just
  $ git format-patch -4 -s
  $ git send-email 000*
But not even
  $ git send-email --thread 000*
seems to work.
Only 
  $ git format-patch -4 -s --thread
  $ git send-email 000*
Markus Heidelberg· Jun 7, 2009, 15:20 UTC · re: Markus Heidelberg · lore

[PATCH 1/2] add a test case for threaded mails without chain-reply-to

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
Show 20 quoted lines
> Markus Heidelberg, 06.06.2009:
> > Markus Heidelberg (4):
> >   Don't count the submenu entries for checking if it is empty
> >   Correctly count the entries in the revs context menu
> >   Avoid submenus with merely 1 entry
> >   Create a separate submenu for tags
> 
> Hmm, no In-Reply-To in 1..4/4
> 
> I think I managed to do this earlier with just
>   $ git format-patch -4 -s
>   $ git send-email 000*
> 
> But not even
>   $ git send-email --thread 000*
> seems to work.
> 
> Only 
>   $ git format-patch -4 -s --thread
>   $ git send-email 000*
Indeed a regression.
 t/t9001-send-email.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
Show changes to t/t9001-send-email.sh +11 −0
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index ce26ea4..576bbd3 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '
 	grep "In-Reply-To: <in-reply-id@example.com>"
 '
 
+test_expect_failure 'threading but no chain-reply-to' '
+	git send-email \
+		--dry-run \
+		--from="Example <nobody@example.com>" \
+		--to=nobody@example.com \
+		--thread \
+		--no-chain-reply-to \
+		$patches $patches |
+	grep "In-Reply-To: "
+'
+
 test_done
-- 
1.6.3.2.216.g24c61
Markus Heidelberg· Jun 7, 2009, 15:20 UTC · re: Markus Heidelberg · lore

[PATCH 2/2] send-email: fix threaded mails without chain-reply-to

These commands didn't send threaded mails anymore:
    $ git format-patch <revision range>
    $ git send-email --thread --no-chain-reply-to <files>

This regression was introduced in commit 15da108 ("send-email: 'References:' should only reference what is sent", 2009-04-13) by a hidden code style change:

    ! defined $reply_to || length($reply_to) == 0
was changed to
    not defined $reply_to || length($reply_to) == 0
which is
    not (defined $reply_to || length($reply_to) == 0)
instead of
    (not defined $reply_to) || (length($reply_to) == 0)
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 git-send-email.perl   |    2 +-
 t/t9001-send-email.sh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Show changes to 2 files +2 −2

git-send-email.perl, t/t9001-send-email.sh

diff --git a/git-send-email.perl b/git-send-email.perl
index 3d6a982..c914bff 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1142,7 +1142,7 @@ foreach my $t (@files) {
 	my $message_was_sent = send_message();
 
 	# set up for the next message
-	if ($message_was_sent and $chain_reply_to || not defined $reply_to || length($reply_to) == 0) {
+	if ($message_was_sent and $chain_reply_to || !defined $reply_to || length($reply_to) == 0) {
 		$reply_to = $message_id;
 		if (length $references > 0) {
 			$references .= "\n $message_id";
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 576bbd3..bb03aa4 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '
 	grep "In-Reply-To: <in-reply-id@example.com>"
 '
 
-test_expect_failure 'threading but no chain-reply-to' '
+test_expect_success 'threading but no chain-reply-to' '
 	git send-email \
 		--dry-run \
 		--from="Example <nobody@example.com>" \
-- 
1.6.3.2.216.g24c61
Markus Heidelberg· Jun 7, 2009, 16:59 UTC · re: Markus Heidelberg · lore

Re: [PATCH 2/2] send-email: fix threaded mails without chain-reply-to

Markus Heidelberg, 07.06.2009:
> These commands didn't send threaded mails anymore:
> 
>     $ git format-patch <revision range>
>     $ git send-email --thread --no-chain-reply-to <files>

I also just noticed a warning without this patch, can't remember if I have seen it before...

Use of uninitialized value in length at /home/markus/git/install/libexec/git-core/git-send-email line 1146.

Markus Heidelberg· Jun 7, 2009, 17:12 UTC · re: Markus Heidelberg · lore

[PATCH v2] add a test case for threaded mails without chain-reply-to

---

--nochain-reply-to instead of --no-chain-reply-to

see commits 3fee1fe8 and 84eeb687: t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'

 t/t9001-send-email.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
Show changes to t/t9001-send-email.sh +11 −0
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index ce26ea4..4ccca44 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '
 	grep "In-Reply-To: <in-reply-id@example.com>"
 '
 
+test_expect_failure 'threading but no chain-reply-to' '
+	git send-email \
+		--dry-run \
+		--from="Example <nobody@example.com>" \
+		--to=nobody@example.com \
+		--thread \
+		--nochain-reply-to \
+		$patches $patches |
+	grep "In-Reply-To: "
+'
+
 test_done
-- 
1.6.3.2.216.g24c61.dirty
Markus Heidelberg· Jun 7, 2009, 17:18 UTC · re: Markus Heidelberg · lore

Re: [PATCH v2] add a test case for threaded mails without chain-reply-to

Markus Heidelberg, 07.06.2009:
Show 10 quoted lines
> ---
> 
> --nochain-reply-to instead of
> --no-chain-reply-to
> 
> see commits 3fee1fe8 and 84eeb687:
> t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
> 
>  t/t9001-send-email.sh |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)

Ah, the subject should have been [PATCH v2 1/2] and there should have been a Signed-Off. I'll resend cleanly with some more patches in a series shortly (I guess :))

Marco Costalba· Jun 6, 2009, 13:50 UTC · re: Markus Heidelberg · lore

Re: [PATCH QGit 0/4] enhancements for the context menu of the Rev list

On Sat, Jun 6, 2009 at 13:57, Markus Heidelberg<markus.heidelberg@web.de> wrote:
Show 10 quoted lines
> Markus Heidelberg (4):
>  Don't count the submenu entries for checking if it is empty
>  Correctly count the entries in the revs context menu
>  Avoid submenus with merely 1 entry
>  Create a separate submenu for tags
>
>  src/mainimpl.cpp |   51 +++++++++++++++++++++++++++++++++++++++------------
>  1 files changed, 39 insertions(+), 12 deletions(-)
>
>
Thanks for this series. Context menu really needed some love.
Patches applied and pushed to
http://git.kernel.org/?p=qgit/qgit4.git;a=summary
Marco

← back to recent threads