git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Mike Hommey <mh@glandium.org>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "Patrick Steinhardt" <ps@pks.im>
Subject: Re: [ANNOUNCE] Git v2.31.0
Date: Tue, 16 Mar 2021 10:44:26 -0400	[thread overview]
Message-ID: <YFDESmnZvFZNE4fL@coredump.intra.peff.net> (raw)
In-Reply-To: <20210316091026.wta7wpxdyr75xo6x@glandium.org>

On Tue, Mar 16, 2021 at 06:10:26PM +0900, Mike Hommey wrote:

> > > For the record, this is backwards incompatible with git-programs in
> > > $PATH that were expecting the old format (e.g. git-cinnabar releases
> > > using an older version of libgit.a).
> > 
> > What isn't noted there is that we're still parsing the old format in
> > some cases, see f9dbb64fad (config: parse more robust format in
> > GIT_CONFIG_PARAMETERS, 2021-01-12).
> > 
> > But I suspect you mean that you have your own parser that expects the
> > old format only, I didn't find which way it was by grepping
> > git-cinnabar's sources.
> 
> git-cinnabar is using git's libgit.a, so when using a pre-compiled
> version built against git < 2.31.0, it fails to parse
> GIT_CONFIG_PARAMETERS when used with git 2.31.0.
> There's not much I can do apart from releasing a new version.

Yeah, that makes sense. As Ævar noted, we did write it such that people
passing in values would be unaffected. But we couldn't help anybody
_parsing_ the old format. This was a risk we accepted, because it's an
undocumented internal format.

So the "right" thing to do would be for the receiving side to pull the
value out with "git config" (which, presumably running the same version
of Git as the generating side, would do fine). I understand why a
program like git-cinnabar wouldn't want to make a bunch of awkward and
expensive git-config calls. But it's a problem that comes with using the
(also undocumented and not recommended) libgit.a as an interface.

So I am sad to have created headaches, but I also think it should not be
a far-reaching problem.

(I also wondered whether something like libgit2 or jgit might have been
parsing GIT_CONFIG_PARAMETERS, but neither seems to).

-Peff

      reply	other threads:[~2021-03-16 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 19:30 Junio C Hamano
2021-03-16  5:14 ` Mike Hommey
2021-03-16  8:51   ` Ævar Arnfjörð Bjarmason
2021-03-16  9:10     ` Mike Hommey
2021-03-16 14:44       ` Jeff King [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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=YFDESmnZvFZNE4fL@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    --cc=ps@pks.im \
    --subject='Re: [ANNOUNCE] Git v2.31.0' \
    /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

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 NNTP newsgroup(s).