Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Why is the .git directory listed in Explorer views?(Seems odd that git metadata files should be exposed in Repository views)
Why is the .git directory listed in Explorer views? [message #719240] Fri, 26 August 2011 13:55 Go to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
I've been meaning to ask for some time: Why is the .git directory listed in Explorer views? It seems odd to me that internal repository files and directories should be exposed in this way. Both Subclipse and MercurialEclipse hide this kind of information (.svn, .hg). I understand that hackers might want to muck around manually with those files. But I'm not sure it's a good idea to encourage that kind of thing.

The .git directory is also listed in the "Working Directory" section of entries in the Git Repositories view. This is even odder: certainly .git, which is to say, the repository itself, is not part of "Working Directory".
(no subject) [message #719401 is a reply to message #719240] Fri, 26 August 2011 22:46 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
R Shapiro skrev 2011-08-26 15.55:
> I've been meaning to ask for some time: Why is the .git directory listed
> in Explorer views? It seems odd to me that internal repository files
> and directories should be exposed in this way. Both Subclipse and
> MercurialEclipse hide this kind of information (.svn, .hg). I understand
> that hackers might want to muck around manually with those files. But
> I'm not sure it's a good idea to encourage that kind of thing.
> The .git directory is also listed in the "Working Directory" section of
> entries in the Git Repositories view. This is even odder: certainly
> .git, which is to say, the repository itself, is not part of "Working
> Directory".
>


I recall it used to be hidden... a bug

-- robin
Re: Why is the .git directory listed in Explorer views? [message #720400 is a reply to message #719240] Tue, 30 August 2011 14:08 Go to previous messageGo to next message
Stefan Lay is currently offline Stefan LayFriend
Messages: 342
Registered: July 2009
Senior Member
I only know about the generic filter available in the view menus. Here I think in the Package Explorer the default is that .*-resources are not displayed. Therefore I do not see them.

I could not find out how CVS manages to hide the CVS-folders from the resource trees. Can anybody give me a hint how they do that? Is there an extension point? I checked the plugin.xml in org.eclipse.team.cvs.ui and in org.eclipse.team.cvs.core but to no avail.
(no subject) [message #720533 is a reply to message #720400] Tue, 30 August 2011 19:13 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Stefan Lay skrev 2011-08-30 16.08:
> I only know about the generic filter available in the view menus. Here I
> think in the Package Explorer the default is that .*-resources are not
> displayed. Therefore I do not see them.
>
> I could not find out how CVS manages to hide the CVS-folders from the
> resource trees. Can anybody give me a hint how they do that? Is there an
> extension point? I checked the plugin.xml in org.eclipse.team.cvs.ui and
> in org.eclipse.team.cvs.core but to no avail.

There is a function for marking things "team private", that is supposed
to hide it (as I understand it).

-- robin
Re: (no subject) [message #720758 is a reply to message #720533] Wed, 31 August 2011 08:15 Go to previous messageGo to next message
Stefan Lay is currently offline Stefan LayFriend
Messages: 342
Registered: July 2009
Senior Member
Ah, you're right:

IResource has two constants which sound interesting: TEAM_PRIVATE and HIDDEN

We even already call dotGit.setTeamPrivateMember(true) in GitProjectData.

We have to investigate why the folder is nevertheless shown in the Explorer Views. Maybe we have also to call setHidden(true).

Stefan
Re: (no subject) [message #720914 is a reply to message #720758] Wed, 31 August 2011 13:37 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Keep in mind that Explorer views are not the only problem. The appearance of .git as part of the "Working Directory" in the "Git Repositories" view is arguably worse. It really makes no sense at all to include the internal repository data as part of the working directory.
Re: (no subject) [message #722278 is a reply to message #720914] Mon, 05 September 2011 08:33 Go to previous messageGo to next message
Stefan Lay is currently offline Stefan LayFriend
Messages: 342
Registered: July 2009
Senior Member
I think it is a feature that a user can browse the .git folder.

But you're right, the location below "Working Directory" is not semantically correct. Maybe we could show it in another node, e.g. Repository, or GIT.
Re: (no subject) [message #722347 is a reply to message #722278] Mon, 05 September 2011 13:15 Go to previous message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
For the "Git Repositories" view this sounds great: make the contents of .git accessible but in its own top-level entry, "GIT", parallel to "Branches", "Tags", "References", "Remotes" and "Working directory". Or maybe call it "GIT_DIR" to match what the bash completion helper uses for the prompt.

I don't think .git should be displayed in Explorer views though. It's too confusing to casual users.

Previous Topic: ! [remote rejected] master -> master (prohibited by Gerrit)
Next Topic:Archive/package for manual installation
Goto Forum:
  


Current Time: Fri Mar 29 05:03:36 GMT 2024

Powered by FUDForum. Page generated in 0.24976 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top