[git-users] Re: git repository versioned .config file?

2014-06-10 Thread Alexander Zorgiev
For instance I want to put some git extensions into my project git 
repository. The documentation states that the path must be accessible 
through git --ext-path. This can be altered either globally or 
per-repository basis in .config. But this file seems to be unversioned. If 
we in future will have a need to move/rename our extensions folder - 
everybody who contributes to project will have to manually alter .config 
file in his repository copy.

вторник, 3 июня 2014 г., 14:24:43 UTC+3 пользователь Pierre-François 
CLEMENT написал:


 I want to extend git commands set on per-repository basis and therefore I 
 need to have VERSIONED sort of .config file


 You can use the repository's .git/config file to set repo-specific 
 configuration, but why would you want it to be versioned in the project 
 itself? It'd force anybody who can clone the repo to have the same config 
 file.

 I guess that the closer you could get to this would be to version a, say, 
 git.config file in the project root and then replace the repo's 
 .git/config file with a symlink to it. But keep in mind that it'll still 
 require whoever can clone the repo to decide to do so, you won't be able to 
 force them -- and doing so will prevent them from having their own 
 per-repository config file.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-10 Thread Alexander Zorgiev
Symlinks has nothing to do with the fact that I want the part of the 
configuration to be versioned. BTW on windows symlinks work kinda 
differently. Of course since Vista/Server 2008 we have mklink bundled, but 
I don't think msys.win will handle this situation correctly. Nevertheless 
the fact that the path to project-specific git extensions can change in 
futer remains true. So the only way to handle this correctly is to allow 
repository git configuration be versioned. At least a part of it.

вторник, 3 июня 2014 г., 15:12:09 UTC+3 пользователь Magnus Therning 
написал:

 On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote: 
  
  
   I want to extend git commands set on per-repository basis and 
 therefore I 
   need to have VERSIONED sort of .config file 
   
  
  You can use the repository's .git/config file to set repo-specific 
  configuration, but why would you want it to be versioned in the 
  project itself? It'd force anybody who can clone the repo to have 
  the same config file. 
  
  I guess that the closer you could get to this would be to version a, 
  say, git.config file in the project root and then replace the repo's 
  .git/config file with a symlink to it. But keep in mind that it'll 
  still require whoever can clone the repo to decide to do so, you 
  won't be able to force them -- and doing so will prevent them from 
  having their own per-repository config file. 

 Something I'd be more comfortable with is making `git-config` a shell 
 script containing calls to `git config --local`.  Yes, it's then a 
 two-step procedure, and people might forget to perform the second 
 step, but *I* am in control and a `git pull` will not silently cause 
 any config changes. 

 /M 

 -- 
 Magnus Therning  OpenPGP: 0xAB4DFBA4 
 email: mag...@therning.org javascript:   jabber: mag...@therning.org 
 javascript: 
 twitter: magthe   http://therning.org/magnus 

 What gets measured, gets done. 
  -- Tom Peters 


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-10 Thread Alexander Zorgiev
The question is in fact not to let people not to perform these steps 
manually.

вторник, 3 июня 2014 г., 15:32:26 UTC+3 пользователь Pierre-François 
CLEMENT написал:

 Sounds good enough. You could probably even embed it into a Makefile or a 
 Gruntfile or whatever-file you're using if you already have one. And about 
 the two-steps thing, you might want to get them to use a post-merge hook to 
 automate it.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-10 Thread Alexander Zorgiev
Post-merge hook? Anyways someone needs to set up this post-merge hook in a 
manual fashion.

вторник, 3 июня 2014 г., 15:34:12 UTC+3 пользователь John McKown написал:

 On Tue, Jun 3, 2014 at 7:12 AM, Magnus Therning mag...@therning.org 
 javascript: wrote:

 On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote:
 
 
   I want to extend git commands set on per-repository basis and 
 therefore I
   need to have VERSIONED sort of .config file
  
 
  You can use the repository's .git/config file to set repo-specific
  configuration, but why would you want it to be versioned in the
  project itself? It'd force anybody who can clone the repo to have
  the same config file.
 
  I guess that the closer you could get to this would be to version a,
  say, git.config file in the project root and then replace the repo's
  .git/config file with a symlink to it. But keep in mind that it'll
  still require whoever can clone the repo to decide to do so, you
  won't be able to force them -- and doing so will prevent them from
  having their own per-repository config file.

 Something I'd be more comfortable with is making `git-config` a shell
 script containing calls to `git config --local`.  Yes, it's then a
 two-step procedure, and people might forget to perform the second
 step, but *I* am in control and a `git pull` will not silently cause
 any config changes.


 Magnus,
 I haven't even really looked into this, but if you are using Linux with 
 the BASH shell, you might want to look at using the alias command in your 
 ~/.profile so that the command git invokes your own shell script. This is 
 rather easy with a line something like:

 alias git=~/bin/mygit

 Now, when the BASH shell sees the git command, it actually invokes the 
 ~/bin/mygit program (which is a shell script). I haven't looked at writing 
 such a script, but I think that you'd basically just check to see if the 
 first parameter is config, and, if not, then invoke the normal git 
 program. If the first parameter is config, then force the --local 
 parameter (or not, whatever you decide you need).

 Of, if by chance, you actually want to directly run git without using the 
 alias, just enclose the git command in  marks, like:

 git config --global ...


 The plus of this is that such a modification will only affect you, not 
 anyone else who may be on that machine. The minus is the same. Whether it 
 is a plus or a minus depends on your wants: only modify git for me, or 
 modify git for everybody.
  
 Wish I had the time right now to work on that script. Hopefully this is of 
 some help. But, like when I was in cleaning: I don't _do_ Windows! grin/


 /M

 --
 Magnus Therning  OpenPGP: 0xAB4DFBA4
 email: mag...@therning.org javascript:   jabber: mag...@therning.org 
 javascript:
 twitter: magthe   http://therning.org/magnus

 What gets measured, gets done.
  -- Tom Peters




 -- 
 There is nothing more pleasant than traveling and meeting new people!
 Genghis Khan

 Maranatha! 
 John McKown
  

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-10 Thread Alexander Zorgiev
It seems there is no comfortable platform-independed way to do this. Maybe 
feature request?

вторник, 3 июня 2014 г., 15:34:12 UTC+3 пользователь John McKown написал:

 On Tue, Jun 3, 2014 at 7:12 AM, Magnus Therning mag...@therning.org 
 javascript: wrote:

 On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote:
 
 
   I want to extend git commands set on per-repository basis and 
 therefore I
   need to have VERSIONED sort of .config file
  
 
  You can use the repository's .git/config file to set repo-specific
  configuration, but why would you want it to be versioned in the
  project itself? It'd force anybody who can clone the repo to have
  the same config file.
 
  I guess that the closer you could get to this would be to version a,
  say, git.config file in the project root and then replace the repo's
  .git/config file with a symlink to it. But keep in mind that it'll
  still require whoever can clone the repo to decide to do so, you
  won't be able to force them -- and doing so will prevent them from
  having their own per-repository config file.

 Something I'd be more comfortable with is making `git-config` a shell
 script containing calls to `git config --local`.  Yes, it's then a
 two-step procedure, and people might forget to perform the second
 step, but *I* am in control and a `git pull` will not silently cause
 any config changes.


 Magnus,
 I haven't even really looked into this, but if you are using Linux with 
 the BASH shell, you might want to look at using the alias command in your 
 ~/.profile so that the command git invokes your own shell script. This is 
 rather easy with a line something like:

 alias git=~/bin/mygit

 Now, when the BASH shell sees the git command, it actually invokes the 
 ~/bin/mygit program (which is a shell script). I haven't looked at writing 
 such a script, but I think that you'd basically just check to see if the 
 first parameter is config, and, if not, then invoke the normal git 
 program. If the first parameter is config, then force the --local 
 parameter (or not, whatever you decide you need).

 Of, if by chance, you actually want to directly run git without using the 
 alias, just enclose the git command in  marks, like:

 git config --global ...


 The plus of this is that such a modification will only affect you, not 
 anyone else who may be on that machine. The minus is the same. Whether it 
 is a plus or a minus depends on your wants: only modify git for me, or 
 modify git for everybody.
  
 Wish I had the time right now to work on that script. Hopefully this is of 
 some help. But, like when I was in cleaning: I don't _do_ Windows! grin/


 /M

 --
 Magnus Therning  OpenPGP: 0xAB4DFBA4
 email: mag...@therning.org javascript:   jabber: mag...@therning.org 
 javascript:
 twitter: magthe   http://therning.org/magnus

 What gets measured, gets done.
  -- Tom Peters




 -- 
 There is nothing more pleasant than traveling and meeting new people!
 Genghis Khan

 Maranatha! 
 John McKown
  

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-10 Thread Alexander Zorgiev
SRY: The question is in fact not to let people to perform these steps 
manually.

вторник, 10 июня 2014 г., 14:09:57 UTC+3 пользователь Alexander Zorgiev 
написал:

 The question is in fact not to let people not to perform these steps 
 manually.

 вторник, 3 июня 2014 г., 15:32:26 UTC+3 пользователь Pierre-François 
 CLEMENT написал:

 Sounds good enough. You could probably even embed it into a Makefile or a 
 Gruntfile or whatever-file you're using if you already have one. And about 
 the two-steps thing, you might want to get them to use a post-merge hook to 
 automate it.



-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Re: git repository versioned .config file?

2014-06-03 Thread Pierre-François CLEMENT


 I want to extend git commands set on per-repository basis and therefore I 
 need to have VERSIONED sort of .config file


You can use the repository's .git/config file to set repo-specific 
configuration, but why would you want it to be versioned in the project 
itself? It'd force anybody who can clone the repo to have the same config 
file.

I guess that the closer you could get to this would be to version a, say, 
git.config file in the project root and then replace the repo's .git/config 
file with a symlink to it. But keep in mind that it'll still require 
whoever can clone the repo to decide to do so, you won't be able to force 
them -- and doing so will prevent them from having their own per-repository 
config file.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-03 Thread Magnus Therning
On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote:
 
 
  I want to extend git commands set on per-repository basis and therefore I 
  need to have VERSIONED sort of .config file
 
 
 You can use the repository's .git/config file to set repo-specific
 configuration, but why would you want it to be versioned in the
 project itself? It'd force anybody who can clone the repo to have
 the same config file.
 
 I guess that the closer you could get to this would be to version a,
 say, git.config file in the project root and then replace the repo's
 .git/config file with a symlink to it. But keep in mind that it'll
 still require whoever can clone the repo to decide to do so, you
 won't be able to force them -- and doing so will prevent them from
 having their own per-repository config file.

Something I'd be more comfortable with is making `git-config` a shell
script containing calls to `git config --local`.  Yes, it's then a
two-step procedure, and people might forget to perform the second
step, but *I* am in control and a `git pull` will not silently cause
any config changes.

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

What gets measured, gets done.
 -- Tom Peters


pgpsh7zvQUgkM.pgp
Description: PGP signature


Re: [git-users] Re: git repository versioned .config file?

2014-06-03 Thread Pierre-François CLEMENT
Sounds good enough. You could probably even embed it into a Makefile or a 
Gruntfile or whatever-file you're using if you already have one. And about 
the two-steps thing, you might want to get them to use a post-merge hook to 
automate it.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-03 Thread John McKown
On Tue, Jun 3, 2014 at 7:12 AM, Magnus Therning mag...@therning.org wrote:

 On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote:
 
 
   I want to extend git commands set on per-repository basis and
 therefore I
   need to have VERSIONED sort of .config file
  
 
  You can use the repository's .git/config file to set repo-specific
  configuration, but why would you want it to be versioned in the
  project itself? It'd force anybody who can clone the repo to have
  the same config file.
 
  I guess that the closer you could get to this would be to version a,
  say, git.config file in the project root and then replace the repo's
  .git/config file with a symlink to it. But keep in mind that it'll
  still require whoever can clone the repo to decide to do so, you
  won't be able to force them -- and doing so will prevent them from
  having their own per-repository config file.

 Something I'd be more comfortable with is making `git-config` a shell
 script containing calls to `git config --local`.  Yes, it's then a
 two-step procedure, and people might forget to perform the second
 step, but *I* am in control and a `git pull` will not silently cause
 any config changes.


Magnus,
I haven't even really looked into this, but if you are using Linux with the
BASH shell, you might want to look at using the alias command in your
~/.profile so that the command git invokes your own shell script. This is
rather easy with a line something like:

alias git=~/bin/mygit

Now, when the BASH shell sees the git command, it actually invokes the
~/bin/mygit program (which is a shell script). I haven't looked at writing
such a script, but I think that you'd basically just check to see if the
first parameter is config, and, if not, then invoke the normal git
program. If the first parameter is config, then force the --local
parameter (or not, whatever you decide you need).

Of, if by chance, you actually want to directly run git without using the
alias, just enclose the git command in  marks, like:

git config --global ...


The plus of this is that such a modification will only affect you, not
anyone else who may be on that machine. The minus is the same. Whether it
is a plus or a minus depends on your wants: only modify git for me, or
modify git for everybody.

Wish I had the time right now to work on that script. Hopefully this is of
some help. But, like when I was in cleaning: I don't _do_ Windows! grin/


 /M

 --
 Magnus Therning  OpenPGP: 0xAB4DFBA4
 email: mag...@therning.org   jabber: mag...@therning.org
 twitter: magthe   http://therning.org/magnus

 What gets measured, gets done.
  -- Tom Peters




-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! 
John McKown

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: git repository versioned .config file?

2014-06-03 Thread Magnus Therning
On Tue, Jun 03, 2014 at 07:34:10AM -0500, John McKown wrote:
 On Tue, Jun 3, 2014 at 7:12 AM, Magnus Therning mag...@therning.org wrote:
 
  On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote:
  
  
I want to extend git commands set on per-repository basis and
  therefore I
need to have VERSIONED sort of .config file
   
  
   You can use the repository's .git/config file to set repo-specific
   configuration, but why would you want it to be versioned in the
   project itself? It'd force anybody who can clone the repo to have
   the same config file.
  
   I guess that the closer you could get to this would be to version a,
   say, git.config file in the project root and then replace the repo's
   .git/config file with a symlink to it. But keep in mind that it'll
   still require whoever can clone the repo to decide to do so, you
   won't be able to force them -- and doing so will prevent them from
   having their own per-repository config file.
 
  Something I'd be more comfortable with is making `git-config` a shell
  script containing calls to `git config --local`.  Yes, it's then a
  two-step procedure, and people might forget to perform the second
  step, but *I* am in control and a `git pull` will not silently cause
  any config changes.
 
 
 Magnus,
 I haven't even really looked into this, but if you are using Linux with the
 BASH shell, you might want to look at using the alias command in your
 ~/.profile so that the command git invokes your own shell script. This is
 rather easy with a line something like:
 
 alias git=~/bin/mygit
 
 Now, when the BASH shell sees the git command, it actually invokes the
 ~/bin/mygit program (which is a shell script). I haven't looked at writing
 such a script, but I think that you'd basically just check to see if the
 first parameter is config, and, if not, then invoke the normal git
 program. If the first parameter is config, then force the --local
 parameter (or not, whatever you decide you need).
 
 Of, if by chance, you actually want to directly run git without using the
 alias, just enclose the git command in  marks, like:
 
 git config --global ...
 
 
 The plus of this is that such a modification will only affect you, not
 anyone else who may be on that machine. The minus is the same. Whether it
 is a plus or a minus depends on your wants: only modify git for me, or
 modify git for everybody.
 
 Wish I had the time right now to work on that script. Hopefully this is of
 some help. But, like when I was in cleaning: I don't _do_ Windows! grin/

Sorry, it wasn't my intention to confuse you.  I did not mean
replacing `git config` (aka `git-config`) but rather I meant the
`git.config` referred to earlier and then I misspelled it :)

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Perl is another example of filling a tiny, short-term need, and then
being a real problem in the longer term.
 -- Alan Kay


pgprpXsvMn1Il.pgp
Description: PGP signature


[git-users] Re: git repository versioned .config file?

2014-06-02 Thread Thomas Ferris Nicolaisen
On Monday, June 2, 2014 3:07:18 PM UTC+2, Alexander Zorgiev wrote:

 Hello everybody,

 I wonder if there is such a thing. For instance I want to extend git 
 commands set on per-repository basis and therefore I need to have VERSIONED 
 sort of .config file where I can put some command there to extend git exec 
 path?


I don't think there is such a thing, nor have I ever heard of anyone 
needing such a feature.. Can you give a concrete example of what you are 
trying to achieve, and we can perhaps come up with some better approach for 
it? 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.