git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] setup: recognise extensions.objectFormat

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 26, 2018, 14:41 UTC
Message-ID
<nycvar.QRO.7.76.6.1801261002570.35@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
In-Reply-To
<CACsJy8BFsXAMAGYjKp8EBrepqZwgKrAtqRKyiKLOydWbpzZWWA@mail.gmail.com>
Hi Duy,
On Thu, 25 Jan 2018, Duy Nguyen wrote:
Show 21 quoted lines
> On Wed, Jan 24, 2018 at 8:09 PM, Patryk Obara <patryk.obara@gmail.com> wrote:
> > This extension selects which hashing algorithm from vtable should be
> > used for reading and writing objects in the object store.  At the moment
> > supports only single value (sha-1).
> >
> > In case value of objectFormat is an unknown hashing algorithm, Git
> > command will fail with following message:
> >
> >   fatal: unknown repository extensions found:
> >           objectformat = <value>
> >
> > To indicate, that this specific objectFormat value is not recognised.
> >
> > The objectFormat extension is not allowed in repository marked as
> > version 0 to prevent any possibility of accidentally writing a NewHash
> > object in the sha-1 object store. This extension behaviour is different
> > than preciousObjects extension (which is allowed in repo version 0).
> 
> This config is so sensitive I wonder if we should forbid changing it
> via git-config. You can't simply change this and expect anything to
> work anyway.

I don't think it makes sense to forbid `git config` from changing these values, as it is all-too-easy to change them via `git config -e` *anyway*. And we already have the repositoryFormat precedent with the exact same issue.

In my opinion, it would only complicate the code, for very little (if at all noticable) benefit.

Ciao, Dscho

Previous: Duy NguyenNext: Patryk Obara
Message 4 of 6 in “setup: recognise extensions.objectFormat”
  1. setup: recognise extensions.objectFormatPatryk Obara, Jan 24, 2018
  2. Patryk ObaraJan 24, 2018
  3. Duy NguyenJan 25, 2018
  4. Johannes SchindelinJan 26, 2018
  5. Patryk ObaraJan 26, 2018
  6. Stefan BellerJan 26, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.