git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* multiple .gitignore and friends  in same workdir possible?
@ 2010-04-23 12:46 Konrad Karl
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 12:46 UTC (permalink / raw)
  To: git

Hi,

while trying to move our Windows people from VSS to git i am
facing the following problem:

I want to have two (or three) git repos wich all share the
same working directory (this is manageable by environment variables),
one for the real source files and the other for 3'rd party binaries 
(*.dll, *.lib + perhaps include files for those)
and perhaps a third one for debugging symbol files (*.pdb and such)

In order to have .gitignore (and .gitattributes) files versioned
and also distributed on git clone they need to be inside the
work dir. Unfortunately the sources and binaries are co-located
inside the work dir subfolders - for historic reasons.

So i would like to have a mechanism to be able to specify different
filenames for .gitignore and .gitattributes  without having to
recompile git, perhaps by an environment variable.
(e.g by a suffix like .gitignore.src .gitignore.bin etc)

Is this currently possible or am I missing something? It would ease
my task a lot. 

Greetings,
Konrad

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

* multiple .gitignore and friends  in same workdir possible?
@ 2010-04-23 12:46 Konrad Karl
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 12:46 UTC (permalink / raw)
  To: git

Hi,

while trying to move our Windows people from VSS to git i am
facing the following problem:

I want to have two (or three) git repos wich all share the
same working directory (this is manageable by environment variables),
one for the real source files and the other for 3'rd party binaries 
(*.dll, *.lib + perhaps include files for those)
and perhaps a third one for debugging symbol files (*.pdb and such)

In order to have .gitignore (and .gitattributes) files versioned
and also distributed on git clone they need to be inside the
work dir. Unfortunately the sources and binaries are co-located
inside the work dir subfolders - for historic reasons.

So i would like to have a mechanism to be able to specify different
filenames for .gitignore and .gitattributes  without having to
recompile git, perhaps by an environment variable.
(e.g by a suffix like .gitignore.src .gitignore.bin etc)

Is this currently possible or am I missing something? It would ease
my task a lot. 

Greetings,
Konrad

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

* Re: multiple .gitignore and friends in same workdir possible?
       [not found] <4526533254752708319@unknownmsgid>
@ 2010-04-23 13:01 ` Sverre Rabbelier
  2010-04-23 14:32   ` Konrad Karl
  2010-04-23 14:32   ` Konrad Karl
  0 siblings, 2 replies; 11+ messages in thread
From: Sverre Rabbelier @ 2010-04-23 13:01 UTC (permalink / raw)
  To: Konrad Karl; +Cc: git

Heya,

On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
> Is this currently possible or am I missing something? It would ease
> my task a lot.

I assume that each repo has it's own gitdir, in which case it has it's
own config file, so you could just use "git config core.excludesfile
.gitignore.one"?

-- 
Cheers,

Sverre Rabbelier

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 13:01 ` multiple .gitignore and friends in same workdir possible? Sverre Rabbelier
@ 2010-04-23 14:32   ` Konrad Karl
  2010-04-23 14:50     ` Michael J Gruber
  2010-04-23 14:32   ` Konrad Karl
  1 sibling, 1 reply; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 14:32 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: git

Hi

On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> Heya,
> 
> On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
> > Is this currently possible or am I missing something? It would ease
> > my task a lot.
> 
> I assume that each repo has it's own gitdir, in which case it has it's
> own config file, so you could just use "git config core.excludesfile
> .gitignore.one"?

yes I could (i confess I was not aware of this config var) but
the fine manual says:

  In _addition_ to .gitignore (per-directory) and .git/info/exclude, 
  git looks into this file for patterns of files which are not meant to be tracked.


so if there was some way to _not_ consider the standard .gitignore &friends
I would be happy to live with.


Greetings,
Konrad

> 
> -- 
> Cheers,
> 
> Sverre Rabbelier

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 13:01 ` multiple .gitignore and friends in same workdir possible? Sverre Rabbelier
  2010-04-23 14:32   ` Konrad Karl
@ 2010-04-23 14:32   ` Konrad Karl
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 14:32 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: git

Hi

On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> Heya,
> 
> On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
> > Is this currently possible or am I missing something? It would ease
> > my task a lot.
> 
> I assume that each repo has it's own gitdir, in which case it has it's
> own config file, so you could just use "git config core.excludesfile
> .gitignore.one"?

yes I could (i confess I was not aware of this config var) but
the fine manual says:

  In _addition_ to .gitignore (per-directory) and .git/info/exclude, 
  git looks into this file for patterns of files which are not meant to be tracked.


so if there was some way to _not_ consider the standard .gitignore &friends
I would be happy to live with.


Greetings,
Konrad

> 
> -- 
> Cheers,
> 
> Sverre Rabbelier

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 14:32   ` Konrad Karl
@ 2010-04-23 14:50     ` Michael J Gruber
  2010-04-23 15:03       ` Konrad Karl
  2010-04-23 15:03       ` Konrad Karl
  0 siblings, 2 replies; 11+ messages in thread
From: Michael J Gruber @ 2010-04-23 14:50 UTC (permalink / raw)
  To: Konrad Karl; +Cc: Sverre Rabbelier, git

Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> Hi
> 
> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
>> Heya,
>>
>> On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
>>> Is this currently possible or am I missing something? It would ease
>>> my task a lot.
>>
>> I assume that each repo has it's own gitdir, in which case it has it's
>> own config file, so you could just use "git config core.excludesfile
>> .gitignore.one"?
> 
> yes I could (i confess I was not aware of this config var) but
> the fine manual says:
> 
>   In _addition_ to .gitignore (per-directory) and .git/info/exclude, 
>   git looks into this file for patterns of files which are not meant to be tracked.
> 
> 
> so if there was some way to _not_ consider the standard .gitignore &friends
> I would be happy to live with.

If you control the creation of the repos, why don't you simply leave the
standard .gitignore empty and use the config as suggested by Sverre?

Michael

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 14:50     ` Michael J Gruber
@ 2010-04-23 15:03       ` Konrad Karl
  2010-04-23 15:51         ` Michael J Gruber
  2010-04-23 15:03       ` Konrad Karl
  1 sibling, 1 reply; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 15:03 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Sverre Rabbelier, git

On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> > Hi
> > 
> > On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> >> Heya,
> >>
[ ...... ]
> > so if there was some way to _not_ consider the standard .gitignore &friends
> > I would be happy to live with.
> 
> If you control the creation of the repos, why don't you simply leave the
> standard .gitignore empty and use the config as suggested by Sverre?

Because this information does not getting transfered with git clone.

People have the chance to forget to set this variable after cloning the
source repo and they will. 

Konrad

> 
> Michael
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 14:50     ` Michael J Gruber
  2010-04-23 15:03       ` Konrad Karl
@ 2010-04-23 15:03       ` Konrad Karl
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 15:03 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Sverre Rabbelier, git

On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> > Hi
> > 
> > On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> >> Heya,
> >>
[ ...... ]
> > so if there was some way to _not_ consider the standard .gitignore &friends
> > I would be happy to live with.
> 
> If you control the creation of the repos, why don't you simply leave the
> standard .gitignore empty and use the config as suggested by Sverre?

Because this information does not getting transfered with git clone.

People have the chance to forget to set this variable after cloning the
source repo and they will. 

Konrad

> 
> Michael
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 15:03       ` Konrad Karl
@ 2010-04-23 15:51         ` Michael J Gruber
  2010-04-23 18:29           ` Konrad Karl
  2010-04-23 18:29           ` Konrad Karl
  0 siblings, 2 replies; 11+ messages in thread
From: Michael J Gruber @ 2010-04-23 15:51 UTC (permalink / raw)
  To: Konrad Karl; +Cc: Sverre Rabbelier, git

Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
> On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
>> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
>>> Hi
>>>
>>> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
>>>> Heya,
>>>>
> [ ...... ]
>>> so if there was some way to _not_ consider the standard .gitignore &friends
>>> I would be happy to live with.
>>
>> If you control the creation of the repos, why don't you simply leave the
>> standard .gitignore empty and use the config as suggested by Sverre?
> 
> Because this information does not getting transfered with git clone.
> 
> People have the chance to forget to set this variable after cloning the
> source repo and they will. 

...and the same is true for setting GIT_DIR appropriately for each repo
- people will commit to the wrong repo, which is even worse. That's why
it's a fragile approach to begin with. Is there no chance you could put
those libs in subdirs and use git modules?

Michael

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 15:51         ` Michael J Gruber
@ 2010-04-23 18:29           ` Konrad Karl
  2010-04-23 18:29           ` Konrad Karl
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 18:29 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Sverre Rabbelier, git

On Fri, Apr 23, 2010 at 05:51:18PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
> > On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> >> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> >>> Hi
> >>>
> >>> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> .........
> > Because this information does not getting transfered with git clone.
> > 
> > People have the chance to forget to set this variable after cloning the
> > source repo and they will. 
> 
> ...and the same is true for setting GIT_DIR appropriately for each repo
> - people will commit to the wrong repo, which is even worse. That's why
> it's a fragile approach to begin with. Is there no chance you could put
> those libs in subdirs and use git modules?

the chance exists for the future but the existing build system does not
support it (especially for older releases which I would like to be able
to rebuild as is).

I think a script with a prominent name in the  workdir which will set 
the git variable  will be the next convenient solution which we can live with.

thanks for your input,
Konrad

> 
> Michael

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

* Re: multiple .gitignore and friends in same workdir possible?
  2010-04-23 15:51         ` Michael J Gruber
  2010-04-23 18:29           ` Konrad Karl
@ 2010-04-23 18:29           ` Konrad Karl
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Karl @ 2010-04-23 18:29 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Sverre Rabbelier, git

On Fri, Apr 23, 2010 at 05:51:18PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
> > On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> >> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> >>> Hi
> >>>
> >>> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> .........
> > Because this information does not getting transfered with git clone.
> > 
> > People have the chance to forget to set this variable after cloning the
> > source repo and they will. 
> 
> ...and the same is true for setting GIT_DIR appropriately for each repo
> - people will commit to the wrong repo, which is even worse. That's why
> it's a fragile approach to begin with. Is there no chance you could put
> those libs in subdirs and use git modules?

the chance exists for the future but the existing build system does not
support it (especially for older releases which I would like to be able
to rebuild as is).

I think a script with a prominent name in the  workdir which will set 
the git variable  will be the next convenient solution which we can live with.

thanks for your input,
Konrad

> 
> Michael

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

end of thread, other threads:[~2010-04-23 18:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4526533254752708319@unknownmsgid>
2010-04-23 13:01 ` multiple .gitignore and friends in same workdir possible? Sverre Rabbelier
2010-04-23 14:32   ` Konrad Karl
2010-04-23 14:50     ` Michael J Gruber
2010-04-23 15:03       ` Konrad Karl
2010-04-23 15:51         ` Michael J Gruber
2010-04-23 18:29           ` Konrad Karl
2010-04-23 18:29           ` Konrad Karl
2010-04-23 15:03       ` Konrad Karl
2010-04-23 14:32   ` Konrad Karl
2010-04-23 12:46 Konrad Karl
  -- strict thread matches above, loose matches on Subject: below --
2010-04-23 12:46 Konrad Karl

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