Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit not recognising git repositories downloaded using repo tool
EGit not recognising git repositories downloaded using repo tool [message #1828070] Sun, 31 May 2020 16:24 Go to next message
Saravanan Narayanan is currently offline Saravanan NarayananFriend
Messages: 4
Registered: May 2020
Junior Member
Hi Team,
I am trying to add existing git repositories present in my local machine to Eclipse.
Please note that the local repositories are cloned using "repo tool" and not using "git clone".

But these repositories are not getting listed when I search for the available local git repositories.

However the same repositories are available when we clone them locally, using "git clone".

Steps I followed:

1. Add an existing local repository
index.php/fa/38219/0/

2. Go to the local path where the repository is available
index.php/fa/38220/0/


As we can see the projects are not getting listed in the search dialog box.
Kindly let me know whether the eclipse EGit supports repositories cloned using repo tool.
Kindly help me in resolving this issue.

Thank you
Re: EGit not recognising git repositories downloaded using repo tool [message #1828074 is a reply to message #1828070] Sun, 31 May 2020 21:50 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4493
Registered: July 2009
Senior Member

Does git from the command line recognize them as repositories?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: EGit not recognising git repositories downloaded using repo tool [message #1828083 is a reply to message #1828074] Mon, 01 June 2020 05:40 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
What is "repo tool"?
Re: EGit not recognising git repositories downloaded using repo tool [message #1828111 is a reply to message #1828074] Tue, 02 June 2020 05:34 Go to previous messageGo to next message
Saravanan Narayanan is currently offline Saravanan NarayananFriend
Messages: 4
Registered: May 2020
Junior Member
@Nitin Dahyabhai :

Yess it is getting recognised

[Updated on: Tue, 02 June 2020 05:35]

Report message to a moderator

Re: EGit not recognising git repositories downloaded using repo tool [message #1828112 is a reply to message #1828083] Tue, 02 June 2020 05:39 Go to previous messageGo to next message
Saravanan Narayanan is currently offline Saravanan NarayananFriend
Messages: 4
Registered: May 2020
Junior Member
@Thomas Wolf :

Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development .

https://gerrit.googlesource.com/git-repo/
Re: EGit not recognising git repositories downloaded using repo tool [message #1828127 is a reply to message #1828112] Tue, 02 June 2020 07:50 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
I don't know what that repo tool does. The EGit dialog uses JGit to figure out whether a directory contains a git repository. JGit assumes that git repositories are either directories named ".git" or having the extension ".git" (bare repos), and that these directories contain an "objects" subdirectory and a "refs" subdirectory and either a "reftable" or a valid HEAD. A valid HEAD is a file called "HEAD" containing either a 40-hex digit SHA1 or starting with "ref: refs/".

Looks like the clones created by this repo tool fail this check? Or does it put them in some other directory?
Re: EGit not recognising git repositories downloaded using repo tool [message #1828152 is a reply to message #1828127] Tue, 02 June 2020 17:10 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Also, where does this repo tool put the git clones? I see at https://source.android.com/setup/develop/repo that "repo init" at least creates some ".repo" subdirectory. Are the git clones also inside that?

Finally, what version of EGit are you using? In current EGit the "Add Git Repositories" dialog you show has an additional checkbox "Skip hidden directories". (If checked, it would skip ".repo" on Linux.)
Re: EGit not recognising git repositories downloaded using repo tool [message #1828157 is a reply to message #1828152] Wed, 03 June 2020 01:32 Go to previous messageGo to next message
Saravanan Narayanan is currently offline Saravanan NarayananFriend
Messages: 4
Registered: May 2020
Junior Member
index.php/fa/38233/0/Hello Thomas Wolf,
Thank you for the sharing.
I have updated the git plugin and again the same issue persists.

When getting cloned from repo init ,
".repo" subdirectory is created and the .git folders for each clone is inside that.

Hence this .repo subdirectory is getting recognised but not the working directory of the clone where source code is present.

Here are the attachments,

1) When I search the working dir, where the source code is available.

index.php/fa/38232/0/


2) When I search the .repo alone,

index.php/fa/38233/0/



Here we can see the .git inside the " .repo direcotry" is getting recognized, but we need the .git inside the source code folder to be recognized.

Also I could see , the sub directories such as objects, refs, inside .git of source code folder are symlinks pointing to corresponding objects, refs of .repo
index.php/fa/38234/0/

index.php/fa/38235/0/
  • Attachment: step3.PNG
    (Size: 23.79KB, Downloaded 438 times)
  • Attachment: step4.png
    (Size: 107.38KB, Downloaded 450 times)
  • Attachment: step5.PNG
    (Size: 26.62KB, Downloaded 425 times)

[Updated on: Wed, 03 June 2020 14:37]

Report message to a moderator

Re: EGit not recognising git repositories downloaded using repo tool [message #1828195 is a reply to message #1828157] Wed, 03 June 2020 14:55 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Symlinks are not files. I'm not even sure JGit could work with such a fake .git directory. And JGit doesn't support git-worktree (multiple working trees per git repo) yet.
Previous Topic:Behavior of JGit regarding links?
Next Topic:Errors in Eclipse 2020-03 with latest ADT
Goto Forum:
  


Current Time: Tue Oct 08 12:33:42 GMT 2024

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

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

Back to the top