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

Re: slash in branch name

From
Jeff King <peff@peff.net>
Date
Jun 17, 2015, 19:24 UTC
Message-ID
<20150617192444.GD25304@peff.net>
In-Reply-To
<5581C77A.3040703@wp.pl>
On Wed, Jun 17, 2015 at 08:16:10PM +0100, KK wrote:
> remote: error: invalid key: hooks.denypush.branch.versions/4.3.2
> remote: error: invalid key: hooks.allowmerge.versions/4.3.2
> [...]
Those are syntactically bogus config keys. Keys should be of the form
  section.subsection.key

and only "subsection" can contain arbitrary bytes (and of course the value can, too). The hooks running on the server are using git's config system in ways that were not intended. It should rearrange its organization of the data (I cannot comment much further without seeing the hooks themselves).

Show 11 quoted lines
> My colleague did some research about that and it seems that this commit has
> stopped update hook working:
> 
> commit b09c53a3e331211fc0154de8ebb271e48f8c7ee5
> Author: Libor Pechacek <lpechacek@suse.cz>
> Date:   Sun Jan 30 20:40:41 2011 +0100
> 
>     Sanity-check config variable names
> [...]
> 
> Could you please advise how to fix/revert this?

I guess we could add a "--no-really-i-am-abusing-git-config" option to git-config to let these pass, at least for lookups. I am not sure that is a good idea, though. I think your hooks are fundamentally broken for branches with odd characters (right now you are seeing complaints on the lookup side, but I suspect that you could not write a "hooks.denypush.branch.versions/4.3.2" entry if you wanted to, as git would choke on reading the config file).

-Peff
Previous: KKNext: KK
Message 2 of 3 in “slash in branch name”
  1. KKJun 17, 2015
  2. Jeff KingJun 17, 2015
  3. KKJun 17, 2015

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.