threads / discuss / 10050

ignoring non-submodule subrepositories

Subject: ignoring non-submodule subrepositories

## tl;dr

2 messages between Sep 27, 2007 and Sep 27, 2007.

replies: 1people: 2as markdown or json

martin f krafft· Sep 27, 2007, 17:07 UTC · lore
Hello,

I have a repository inside another, and for several reasons, I do not want to use git-submodule in this case. My issue is that git-status lists the subrepository as untracked.

Of course, I could add it to .gitignore alright, but instead I wonder whether it would not make sense to ignore subdirectories themselves containing .git/ directories, not explicitly so as to not mess with git-submodule, but implicitly.

Thoughts?
-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
never underestimate the power of human stupidity.
 
spamtraps: madduck.bogus@madduck.net
Junio C Hamano· Sep 27, 2007, 19:29 UTC · re: martin f krafft · lore

Re: ignoring non-submodule subrepositories

martin f krafft <madduck@madduck.net> writes:
Show 10 quoted lines
> I have a repository inside another, and for several reasons, I do
> not want to use git-submodule in this case. My issue is that
> git-status lists the subrepository as untracked.
>
> Of course, I could add it to .gitignore alright, but instead
> I wonder whether it would not make sense to ignore subdirectories
> themselves containing .git/ directories, not explicitly so as to not
> mess with git-submodule, but implicitly.
>
> Thoughts?

I've had a line "/Meta" in my .git/info/excludes ever since I started to maintain the 'todo' branch (which is managed in an independent repository situated there, and pushed into the 'todo' branch of git.git), and having to have that line never bothered me.

While I do not think of a reason offhand not to ignore anything that has .git/ and is not a subproject, other than that ignoring might interfere your adding such a separate project as a subproject. I know "git add" would countermand the ignore list, but not listing means it lets you forget.

Thinking about it more, such a separate project is not even special. We list untracked files to remind you that you might want to add them. Why should a separate project that is not tracked by us (i.e. a potential superproject) be treated any differently from other untracked things on the filesystem?

So, my thoughts are moderate "negative" at this point, but others may have better arguments..

← back to recent threads