user/dev discussion of public-inbox itself
 help / color / mirror / Atom feed
From: Eric Wong <>
Cc: "Eric W. Biederman" <>
Subject: Re: [PATCH] msgmap: mid_insert: use plain "INSERT" to detect duplicates
Date: Tue, 25 Jun 2019 03:48:42 +0000
Message-ID: <20190625034842.aarimkv7hn573b5e@dcvr> (raw)
In-Reply-To: <>

Pushed to `master' with this warning fix squashed in since I
used `$max' elsewhere:

diff --git a/t/msgmap.t b/t/msgmap.t
index 2d018219..20985ce8 100644
--- a/t/msgmap.t
+++ b/t/msgmap.t
@@ -30,8 +30,8 @@ $@ = undef;
 my $ret = $d->mid_insert('a@b');
 is($ret, undef, 'duplicate mid_insert in undef result');
 is($d->num_for('a@b'), $mid2num{'a@b'}, 'existing number not clobbered');
-my $max = (sort(keys %num2mid))[-1];
-is($d->mid_insert('ok@unique'), $max + 1,
+my $next = (sort(keys %num2mid))[-1];
+is($d->mid_insert('ok@unique'), $next + 1,
 	'got expected num after failing mid_insert');

      reply	other threads:[~2019-06-25  3:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 15:59 Q: Did you do something to message number recently? Eric W. Biederman
2019-06-24 16:34 ` Eric Wong
2019-06-24 17:33   ` Eric Wong
2019-06-24 22:56     ` Eric W. Biederman
2019-06-24 23:42       ` Eric Wong
2019-06-25 12:01         ` Eric W. Biederman
2019-06-25 17:51           ` Eric Wong
2019-06-24 23:38 ` [PATCH] msgmap: mid_insert: use plain "INSERT" to detect duplicates Eric Wong
2019-06-25  3:48   ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190625034842.aarimkv7hn573b5e@dcvr \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ \
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for the project(s) associated with this inbox:

AGPL code for this site: git clone