git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
	git@vger.kernel.org,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] t5310-pack-bitmaps: skip JGit tests with SHA256
Date: Thu, 19 Nov 2020 12:19:10 +0100 (CET)
Message-ID: <nycvar.QRO.7.76.6.2011191215140.56@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20201118184543.GA3016@coredump.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

Hi Peff,

On Wed, 18 Nov 2020, Jeff King wrote:

> On Wed, Nov 18, 2020 at 07:30:22PM +0100, SZEDER Gábor wrote:
>
> > > I wonder whether there is a way to change the `JGIT` prereq in a way
> > > that automagically will recognize a (future) SHA256-enabled JGit?
> > > Something like
> > >
> > > test_lazy_prereq JGIT '
> > > 	jgit --version &&
> > >         test_have_prereq !SHA1 ||
> > > 	test "$(git rev-list -n 1 HEAD)" = "$(jgit rev-list -n 1 HEAD)"
> > > '
> > >
> > > What do you think?
> >
> > I'm not sure.  It is surely a substantial effort to fully support
> > SHA256, and I suppose there will be JGit versions with only partial
> > support.  I'm worried that there will be versions that can already
> > read SHA256 objects, but can't read/write SHA256 pack bitmaps, or
> > can't transfer/negotiate SHA256 objects yet (for t5512), so even
> > though they could fulfill such a prereq test above, the test would
> > still fail.
>
> Yeah, it's likely we'll need to just match the output of "jgit
> --version". Since their support is hypothetical at this point, I think
> it makes sense to go with your original patch. It does mean we'll later
> have to remove the SHA1 prereq from those tests, but that's OK. It's not
> very many tests, and your commit message clearly explains what is going
> on.

It's not just removing the SHA-1 prereq, but testing for a new-enough
version.

This most likely entails adding a new test helper to `t/helper/` that
allows using `versioncmp()` via the command-line, with some clever way to
indicate the different outcomes, and then using that in a new prereq.

You know, if it was me, I would opt for the simpler (and future-proof)
solution I presented above. But hey, if that complex solution using
`versioncmp()` floats your boat, who am I to stop you.

Ciao,
Dscho

  reply	other threads:[~2020-11-19 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 21:53 SZEDER Gábor
2020-11-13 21:56 ` Taylor Blau
2020-11-13 23:43 ` brian m. carlson
2020-11-15 21:13 ` SZEDER Gábor
2020-11-15 22:08 ` Johannes Schindelin
2020-11-18 18:30   ` SZEDER Gábor
2020-11-18 18:45     ` Jeff King
2020-11-19 11:19       ` Johannes Schindelin [this message]
2020-11-19 15:44         ` Jeff King

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://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.2011191215140.56@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    --cc=szeder.dev@gmail.com \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

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

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git