user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/2] searchidx: drop redundant decl in index_git_blob_id
Date: Tue,  5 Dec 2023 09:46:22 +0000	[thread overview]
Message-ID: <20231205094623.3394786-2-e@80x24.org> (raw)
In-Reply-To: <20231205094623.3394786-1-e@80x24.org>

Oddly, Perl did not warn about this.  Spotted while confirming
abbreviated OIDs are also indexed when unabbreviated OIDs
appear.
---
 lib/PublicInbox/SearchIdx.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 86c435fd..1bf471fc 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -715,7 +715,6 @@ sub nr_quiet_rm { delete($_[0]->{-quiet_rm}) // 0 }
 sub index_git_blob_id {
 	my ($doc, $pfx, $objid) = @_;
 
-	my $len = length($objid);
 	for (my $len = length($objid); $len >= 7; ) {
 		$doc->add_term($pfx.$objid);
 		$objid = substr($objid, 0, --$len);

  reply	other threads:[~2023-12-05  9:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  9:46 [PATCH 0/2] cindex: future-proof blob OID indexing Eric Wong
2023-12-05  9:46 ` Eric Wong [this message]
2023-12-05  9:46 ` [PATCH 2/2] cindex: index full (40/64 char) hex blob OIDs Eric Wong

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20231205094623.3394786-2-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).