threads / discuss / 23578

Re: multiple .gitignore and friends in same workdir possible?

Subject: Re: multiple .gitignore and friends in same workdir possible?

## tl;dr

9 messages between Apr 23, 2010 and Apr 23, 2010.

replies: 8people: 3as markdown or json

Sverre Rabbelier· Apr 23, 2010, 13:01 UTC · lore
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
Konrad Karl· Apr 23, 2010, 14:32 UTC · re: Sverre Rabbelier · lore
Hi
On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
Show 9 quoted lines
> 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

Show 5 quoted lines
> 
> -- 
> Cheers,
> 
> Sverre Rabbelier
Michael J Gruber· Apr 23, 2010, 14:50 UTC · re: Konrad Karl · lore
Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
Show 22 quoted lines
> 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
Konrad Karl· Apr 23, 2010, 15:03 UTC · re: Michael J Gruber · lore
On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
Show 6 quoted lines
> 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,
> >>
[ ...... ]
Show 5 quoted lines
> > 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
Show 6 quoted lines
> 
> 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
Michael J Gruber· Apr 23, 2010, 15:51 UTC · re: Konrad Karl · lore
Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
Show 18 quoted lines
> 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
Konrad Karl· Apr 23, 2010, 18:29 UTC · re: Michael J Gruber · lore
On Fri, Apr 23, 2010 at 05:51:18PM +0200, Michael J Gruber wrote:
Show 16 quoted lines
> 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
Konrad Karl· Apr 23, 2010, 18:29 UTC · re: Michael J Gruber · lore
On Fri, Apr 23, 2010 at 05:51:18PM +0200, Michael J Gruber wrote:
Show 16 quoted lines
> 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
Konrad Karl· Apr 23, 2010, 15:03 UTC · re: Michael J Gruber · lore
On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
Show 6 quoted lines
> 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,
> >>
[ ...... ]
Show 5 quoted lines
> > 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
Show 6 quoted lines
> 
> 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
Konrad Karl· Apr 23, 2010, 14:32 UTC · re: Sverre Rabbelier · lore
Hi
On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
Show 9 quoted lines
> 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

Show 5 quoted lines
> 
> -- 
> Cheers,
> 
> Sverre Rabbelier

← back to recent threads