git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* slash in branch name
@ 2015-06-17 19:16 KK
  2015-06-17 19:24 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: KK @ 2015-06-17 19:16 UTC (permalink / raw
  To: git

Hi,

After upgrade GIT from 1.7.2.5-3.1 to 1.7.10.4-1+wheezy1 following error 
appear:

git push central versions/4.3.2
Counting objects: 45, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (28/28), done.
Writing objects: 100% (28/28), 13.01 KiB, done.
Total 28 (delta 22), reused 0 (delta 0)
remote: Update script started: Tue Jun 9 13:25:34 BST 2015
remote: Arguments: refs/heads/versions/4.3.2
2e5233728aecc6ac337f4d3a9f32281e7c786e27
ae25cc33f6cf745cfa1061cbdfaf445344a60d13
remote: Warning: using temporary hooks
remote: error: invalid key: hooks.denypush.branch.versions/4.3.2
remote: error: invalid key: hooks.allowmerge.versions/4.3.2
remote: Packages changed by this update:
remote:   think_3
remote:   hls_plugin_1
remote:   hal_av_1
remote:   rtsp_plugin_1
remote: Notifying the following package owners of this update:

hooks were downloaded from:
git://git.et.redhat.com/ovirt-server.git

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

     Sanity-check config variable names when adding and retrieving them. 
  As a side
     effect code duplication between git_config_set_multivar and 
get_value (in
     builtin/config.c) was removed and the common functionality was 
placed in
     git_config_parse_key.

     This breaks a test in t1300 which used invalid section-less keys in 
the tests
     for "git -c". However, allowing such names there was useless, since 
there was
     no way to set them via config file, and no part of git actually 
tried to use
     section-less keys. This patch updates the test to use more 
realistic examples
     as well as adding its own test.

     Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
     Acked-by: Jeff King <peff@peff.net>
     Signed-off-by: Junio C Hamano <gitster@pobox.com>


Could you please advise how to fix/revert this?

brgds,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: slash in branch name
  2015-06-17 19:16 slash in branch name KK
@ 2015-06-17 19:24 ` Jeff King
  2015-06-17 19:38   ` KK
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2015-06-17 19:24 UTC (permalink / raw
  To: KK; +Cc: git

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

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: slash in branch name
  2015-06-17 19:24 ` Jeff King
@ 2015-06-17 19:38   ` KK
  0 siblings, 0 replies; 3+ messages in thread
From: KK @ 2015-06-17 19:38 UTC (permalink / raw
  To: Jeff King; +Cc: git

On 17/06/2015 20:24, Jeff King wrote:
> 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).
>
>> 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
>
>

hooks were downloaded from:
git://git.et.redhat.com/ovirt-server.git

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-17 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17 19:16 slash in branch name KK
2015-06-17 19:24 ` Jeff King
2015-06-17 19:38   ` KK

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.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).