repo-specific environment variables

70 views
Skip to first unread message

Sitaram Chamarty

unread,
Jun 28, 2013, 2:13:09 PM6/28/13
to gito...@googlegroups.com
I have no idea why I didn't think of this till now, but better late than
never I guess...

ref: http://gitolite.com/gitolite/dev-notes.html#rsev

Summary: a line like

option ENV.foo = bar

will create an environment variable called GL_OPTION_foo, with the value
"bar", before any triggers or any git hooks are invoked.

This makes it a heck of a lot easier to write "skip this repo"
conditions in hooks etc., that get run for *all* repos; see examples in
link above.

Javier Domingo

unread,
Jun 28, 2013, 5:30:56 PM6/28/13
to Sitaram Chamarty, gitolite
God bless you. 

PS: I am thinking in triggers for the examples :)

Javier Domingo


2013/6/28 Sitaram Chamarty <sita...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "gitolite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitolite+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Tony Finch

unread,
Jun 29, 2013, 5:45:01 PM6/29/13
to Sitaram Chamarty, gito...@googlegroups.com
On 28 Jun 2013, at 19:13, Sitaram Chamarty <sita...@gmail.com> wrote:
>
> option ENV.foo = bar
>
> will create an environment variable called GL_OPTION_foo, with the value
> "bar", before any triggers or any git hooks are invoked.
>
> This makes it a heck of a lot easier to write "skip this repo"
> conditions in hooks etc., that get run for *all* repos; see examples in
> link above.

Nice :-) Another option is to use git config settings, which is perhaps more friendly for hooks designed for use without gitolite.

Tony.
--
f.anthony.n.finch <d...@dotat.at> http://dotat.at/

Javier Domingo

unread,
Jun 29, 2013, 5:55:19 PM6/29/13
to Tony Finch, Sitaram Chamarty, gito...@googlegroups.com
I may say that this is quite better in my opinion because you skip the
step to grab the value from the var, and more over, you can have case
sensitive parameters.
Javier Domingo


2013/6/29 Tony Finch <d...@dotat.at>:
Reply all
Reply to author
Forward
0 new messages