git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Propagating config to clones/pulls
@ 2010-09-07  8:56 Douglas Tan
  2010-09-07  9:23 ` Thomas Rast
  2010-09-07 21:36 ` Neal Kreitzinger
  0 siblings, 2 replies; 5+ messages in thread
From: Douglas Tan @ 2010-09-07  8:56 UTC (permalink / raw)
  To: git

I have some config settings that I'll like to make default for anyone cloning/pulling from the central remote bare repository. I've tried to do this by editing the config file in the bare repository on the server but the change doesn't appear when cloning. How can I go about pushing default config settings to anyone cloing or pulling from the repository?

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

* Re: Propagating config to clones/pulls
  2010-09-07  8:56 Propagating config to clones/pulls Douglas Tan
@ 2010-09-07  9:23 ` Thomas Rast
  2010-09-07 11:05   ` David Aguilar
  2010-09-07 21:36 ` Neal Kreitzinger
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Rast @ 2010-09-07  9:23 UTC (permalink / raw)
  To: Douglas Tan; +Cc: git

Douglas Tan wrote:
> 
> I have some config settings that I'll like to make default for
> anyone cloning/pulling from the central remote bare repository. I've
> tried to do this by editing the config file in the bare repository
> on the server but the change doesn't appear when cloning. How can I
> go about pushing default config settings to anyone cloing or pulling
> from the repository?

You can't, since that would open a whole range of security issues.

You can put some config defaults inside the repository itself, but it
is up to your users whether they apply them.  Perhaps it's best to
write them as a shellscript that adds to the configuration file(s) so
that it is easy to apply it later, e.g.,

  #!/bin/sh
  git config diff.jpg.textconv exiftool
  cat >> .gitattributes <<EOF
  *.jpg diff=jpg
  EOF

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

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

* Re: Propagating config to clones/pulls
  2010-09-07  9:23 ` Thomas Rast
@ 2010-09-07 11:05   ` David Aguilar
  2010-09-08  3:08     ` Douglas Tan
  0 siblings, 1 reply; 5+ messages in thread
From: David Aguilar @ 2010-09-07 11:05 UTC (permalink / raw)
  To: Thomas Rast; +Cc: Douglas Tan, git

On 9/7/10, Thomas Rast <trast@student.ethz.ch> wrote:
> Douglas Tan wrote:
>  >
>  > I have some config settings that I'll like to make default for
>  > anyone cloning/pulling from the central remote bare repository. I've
>  > tried to do this by editing the config file in the bare repository
>  > on the server but the change doesn't appear when cloning. How can I
>  > go about pushing default config settings to anyone cloing or pulling
>  > from the repository?
>
>  You can't, since that would open a whole range of security issues.
>
>  You can put some config defaults inside the repository itself, but it
>  is up to your users whether they apply them.  Perhaps it's best to
>  write them as a shellscript that adds to the configuration file(s) so
>  that it is easy to apply it later, e.g.,
>
>   #!/bin/sh
>   git config diff.jpg.textconv exiftool
>   cat >> .gitattributes <<EOF
>   *.jpg diff=jpg
>   EOF
>
>  --
>  Thomas Rast
>  trast@{inf,student}.ethz.ch

Also.. if you happen to have administrator access to their machines
(or if they do) then you can roll an .rpm/.deb/etc. containing an
/etc/gitconfig and install it on their machines.  That'll apply these
settings globally without them having to run a script everytime a repo
is cloned.
-- 
    David

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

* Re: Propagating config to clones/pulls
  2010-09-07  8:56 Propagating config to clones/pulls Douglas Tan
  2010-09-07  9:23 ` Thomas Rast
@ 2010-09-07 21:36 ` Neal Kreitzinger
  1 sibling, 0 replies; 5+ messages in thread
From: Neal Kreitzinger @ 2010-09-07 21:36 UTC (permalink / raw)
  To: git

"Douglas Tan" <douglas@getgosu.com> wrote in message 
news:A8F08AD5-6DB5-4A4D-9A8F-79DDBD93E666@getgosu.com...
>I have some config settings that I'll like to make default for anyone 
>cloning/pulling from the central remote bare repository. I've tried to do 
>this by editing the config file in the bare repository on the server but 
>the change doesn't appear when cloning. How can I go about pushing default 
>config settings to anyone cloing or pulling from the repository?--

Based on the assumption that your "child" repos are supposed to have the 
same .git/config files, I tried using git-init --template=x with a config 
file in template directory "x", but git-init only picks up the config file 
on an initialization of a new repo, not on a reinitialization of an existing 
repo.

v/r,
Neal 

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

* Re: Propagating config to clones/pulls
  2010-09-07 11:05   ` David Aguilar
@ 2010-09-08  3:08     ` Douglas Tan
  0 siblings, 0 replies; 5+ messages in thread
From: Douglas Tan @ 2010-09-08  3:08 UTC (permalink / raw)
  To: David Aguilar; +Cc: Thomas Rast, git

Thanks for the suggestions, I think I'll have everyone cloning the repositories to add the configuration settings in ~/.gitconfig instead.

On 07/09/2010, at 7:05 PM, David Aguilar wrote:

> On 9/7/10, Thomas Rast <trast@student.ethz.ch> wrote:
>> Douglas Tan wrote:
>>> 
>>> I have some config settings that I'll like to make default for
>>> anyone cloning/pulling from the central remote bare repository. I've
>>> tried to do this by editing the config file in the bare repository
>>> on the server but the change doesn't appear when cloning. How can I
>>> go about pushing default config settings to anyone cloing or pulling
>>> from the repository?
>> 
>> You can't, since that would open a whole range of security issues.
>> 
>> You can put some config defaults inside the repository itself, but it
>> is up to your users whether they apply them.  Perhaps it's best to
>> write them as a shellscript that adds to the configuration file(s) so
>> that it is easy to apply it later, e.g.,
>> 
>>  #!/bin/sh
>>  git config diff.jpg.textconv exiftool
>>  cat >> .gitattributes <<EOF
>>  *.jpg diff=jpg
>>  EOF
>> 
>> --
>> Thomas Rast
>> trast@{inf,student}.ethz.ch
> 
> Also.. if you happen to have administrator access to their machines
> (or if they do) then you can roll an .rpm/.deb/etc. containing an
> /etc/gitconfig and install it on their machines.  That'll apply these
> settings globally without them having to run a script everytime a repo
> is cloned.
> -- 
>    David

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

end of thread, other threads:[~2010-09-08  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07  8:56 Propagating config to clones/pulls Douglas Tan
2010-09-07  9:23 ` Thomas Rast
2010-09-07 11:05   ` David Aguilar
2010-09-08  3:08     ` Douglas Tan
2010-09-07 21:36 ` Neal Kreitzinger

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