user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/5] git: rename version() to git_version()
  2023-04-12  0:12  5% [PATCH 0/5] various cleanups and tweaks Eric Wong
@ 2023-04-12  0:13  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-04-12  0:13 UTC (permalink / raw)
  To: meta

In case it gets confused with Inbox->version or similar.
---
 lib/PublicInbox/Git.pm        | 10 +++++-----
 lib/PublicInbox/LeiMirror.pm  |  2 +-
 lib/PublicInbox/TestCommon.pm |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index cc337e5d..fd5bbc6b 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -52,11 +52,6 @@ my %ESC_GIT = map { $GIT_ESC{$_} => $_ } keys %GIT_ESC;
 my $EXE_ST = ''; # pack('dd', st_ctime, st_size);
 my ($GIT_EXE, $GIT_VER);
 
-sub version {
-	check_git_exe();
-	$GIT_VER;
-}
-
 sub check_git_exe () {
 	$GIT_EXE = which('git') // die "git not found in $ENV{PATH}";
 	my @st = stat($GIT_EXE) or die "stat: $!";
@@ -72,6 +67,11 @@ sub check_git_exe () {
 	}
 }
 
+sub git_version {
+	check_git_exe();
+	$GIT_VER;
+}
+
 # unquote pathnames used by git, see quote.c::unquote_c_style.c in git.git
 sub git_unquote ($) {
 	return $_[0] unless ($_[0] =~ /\A"(.*)"\z/);
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm
index 8f749688..bed034f1 100644
--- a/lib/PublicInbox/LeiMirror.pm
+++ b/lib/PublicInbox/LeiMirror.pm
@@ -276,7 +276,7 @@ sub fetch_args ($$) {
 			($lei->{opt}->{jobs} // 1) > 1;
 	push @cmd, '-v' if $lei->{opt}->{verbose};
 	push(@cmd, '-p') if $lei->{opt}->{prune};
-	PublicInbox::Git::version() ge v2.29.0 and
+	PublicInbox::Git::git_version() ge v2.29.0 and
 		push(@cmd, '--no-write-fetch-head');
 	@cmd;
 }
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index aa2abc43..ddee58b1 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -111,7 +111,7 @@ sub have_xapian_compact (;$) {
 sub require_git ($;$) {
 	my ($req, $nr) = @_;
 	require PublicInbox::Git;
-	state $cur_vstr = PublicInbox::Git::version();
+	state $cur_vstr = PublicInbox::Git::git_version();
 	$req = eval("v$req") unless isvstring($req);
 
 	return 1 if $cur_vstr ge $req;

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] various cleanups and tweaks
@ 2023-04-12  0:12  5% Eric Wong
  2023-04-12  0:13  7% ` [PATCH 3/5] git: rename version() to git_version() Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-04-12  0:12 UTC (permalink / raw)
  To: meta

Mostly stuff I noticed while working on the fix in commit
4b1a8231d4bae093 (git: fix cat_async_retry, 2023-04-11).

Eric Wong (5):
  git: cat_async_step: reduce batch-command info checks
  gzip_filter: use carp in ->bail for failure checks
  git: rename version() to git_version()
  www_coderepo: drop unused $EACH_REF variable
  git: parallelize manifest_entry

 lib/PublicInbox/Git.pm         | 82 +++++++++++++++++-----------------
 lib/PublicInbox/GzipFilter.pm  | 18 ++++----
 lib/PublicInbox/LeiMirror.pm   |  2 +-
 lib/PublicInbox/TestCommon.pm  |  2 +-
 lib/PublicInbox/WwwCoderepo.pm |  1 -
 5 files changed, 50 insertions(+), 55 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-04-12  0:12  5% [PATCH 0/5] various cleanups and tweaks Eric Wong
2023-04-12  0:13  7% ` [PATCH 3/5] git: rename version() to git_version() Eric Wong

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).