* enable-git-config=1
@ 2012-10-09 12:49 Jason
2012-10-09 13:06 ` enable-git-config=1
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jason @ 2012-10-09 12:49 UTC (permalink / raw)
Hi all,
After some back and forth with Jamie and Ren?, it looks like the git
config semantics are going to be like this:
- gitweb.category maps to the cgit repo config key "section"
- gitweb.description maps to the cgit repo config key "desc"
- gitweb.owner maps to the cgit repo config key "owner"
- cgit.* maps to all other cgit repo config keys
This option can be enabled with "enable-git-config=1", and replaces
all previous "enable-gitweb-*" config keys.
The order of operations is as follows:
- git config settings are applied
- if the owner is not set from git config, get the owner using the
usual getpwuid call
- if the description is not set from git config, look inside the
static $path/description file
- if section-from-path=1, override whatever previous settings were
inside of git config using the section-from-path logic
- parse $path/cgitrc for local repo.* settings, that override all
previous settings
Please test the jd/gitconfig branch, and let me know how it goes.You
can read a diff here:
http://git.zx2c4.com/cgit/commit/?h=jd/gitconfig
Thanks,
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* enable-git-config=1
2012-10-09 12:49 enable-git-config=1 Jason
@ 2012-10-09 13:06 `
2012-10-09 13:09 ` enable-git-config=1 Jason
2012-10-09 13:18 ` enable-git-config=1 jamie.couture
2012-10-09 20:42 ` enable-git-config=1
2 siblings, 1 reply; 6+ messages in thread
From: @ 2012-10-09 13:06 UTC (permalink / raw)
Thanks! This sounds great :).
> - gitweb.category maps to the cgit repo config key "section"
> - gitweb.description maps to the cgit repo config key "desc"
> - gitweb.owner maps to the cgit repo config key "owner"
> - cgit.* maps to all other cgit repo config keys
This description differs a little bit from the code: From the above,
"cgit.owner" for instance would not map to anything, but in the code it
does. Which one is the intended?
I personally would prefer the current code approach, that cgit.*
overwrites gitweb.*.
- Ren?
^ permalink raw reply [flat|nested] 6+ messages in thread
* enable-git-config=1
2012-10-09 13:06 ` enable-git-config=1
@ 2012-10-09 13:09 ` Jason
0 siblings, 0 replies; 6+ messages in thread
From: Jason @ 2012-10-09 13:09 UTC (permalink / raw)
On Tue, Oct 9, 2012 at 3:06 PM, Ren? Neumann <lists at necoro.eu> wrote:
> This description differs a little bit from the code: From the above,
> "cgit.owner" for instance would not map to anything, but in the code it
> does. Which one is the intended?
>
> I personally would prefer the current code approach, that cgit.*
> overwrites gitweb.*.
Thanks for pointing out the lack of language precision. Let me try again:
- gitweb.category maps to the cgit repo config key "section"
- gitweb.description maps to the cgit repo config key "desc"
- gitweb.owner maps to the cgit repo config key "owner"
- cgit.* maps to all cgit repo config keys
- keys are applied in the order that they exist in the git config file
^ permalink raw reply [flat|nested] 6+ messages in thread
* enable-git-config=1
2012-10-09 12:49 enable-git-config=1 Jason
2012-10-09 13:06 ` enable-git-config=1
@ 2012-10-09 13:18 ` jamie.couture
2012-10-09 20:42 ` enable-git-config=1
2 siblings, 0 replies; 6+ messages in thread
From: jamie.couture @ 2012-10-09 13:18 UTC (permalink / raw)
Works fine for me.
Thanks.
Tested on CentOS 6 / Fedora 17
On Tue, Oct 9, 2012 at 8:49 AM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
> Hi all,
>
> After some back and forth with Jamie and Ren?, it looks like the git
> config semantics are going to be like this:
>
> - gitweb.category maps to the cgit repo config key "section"
> - gitweb.description maps to the cgit repo config key "desc"
> - gitweb.owner maps to the cgit repo config key "owner"
> - cgit.* maps to all other cgit repo config keys
>
> This option can be enabled with "enable-git-config=1", and replaces
> all previous "enable-gitweb-*" config keys.
>
> The order of operations is as follows:
>
> - git config settings are applied
> - if the owner is not set from git config, get the owner using the
> usual getpwuid call
> - if the description is not set from git config, look inside the
> static $path/description file
> - if section-from-path=1, override whatever previous settings were
> inside of git config using the section-from-path logic
> - parse $path/cgitrc for local repo.* settings, that override all
> previous settings
>
>
> Please test the jd/gitconfig branch, and let me know how it goes.You
> can read a diff here:
> http://git.zx2c4.com/cgit/commit/?h=jd/gitconfig
>
> Thanks,
> Jason
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* enable-git-config=1
2012-10-09 12:49 enable-git-config=1 Jason
2012-10-09 13:06 ` enable-git-config=1
2012-10-09 13:18 ` enable-git-config=1 jamie.couture
@ 2012-10-09 20:42 `
2012-10-09 22:10 ` enable-git-config=1 Jason
2 siblings, 1 reply; 6+ messages in thread
From: @ 2012-10-09 20:42 UTC (permalink / raw)
Am 09.10.2012 14:49, schrieb Jason A. Donenfeld:
> Please test the jd/gitconfig branch, and let me know how it goes.You
> can read a diff here:
> http://git.zx2c4.com/cgit/commit/?h=jd/gitconfig
One more thing: The second setting of "repo->name" should be removed
(see attached diff). It is already set by cgit_add_repo(), but the
second time it overwrites possible changes from the git-config.
Else it works great here :)
- Ren?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: remove_snd_name_setting.diff
URL: <http://hjemli.net/pipermail/cgit/attachments/20121009/6e59a3a1/attachment.diff>
^ permalink raw reply [flat|nested] 6+ messages in thread
* enable-git-config=1
2012-10-09 20:42 ` enable-git-config=1
@ 2012-10-09 22:10 ` Jason
0 siblings, 0 replies; 6+ messages in thread
From: Jason @ 2012-10-09 22:10 UTC (permalink / raw)
On Tue, Oct 9, 2012 at 10:42 PM, Ren? Neumann <lists at necoro.eu> wrote:
> It is already set by cgit_add_repo(), but the
> second time it overwrites possible changes from the git-config.
Good catch. Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-09 22:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-09 12:49 enable-git-config=1 Jason
2012-10-09 13:06 ` enable-git-config=1
2012-10-09 13:09 ` enable-git-config=1 Jason
2012-10-09 13:18 ` enable-git-config=1 jamie.couture
2012-10-09 20:42 ` enable-git-config=1
2012-10-09 22:10 ` enable-git-config=1 Jason
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).