|Support required in Submodules in EGIT [message #946564]
||Tue, 16 October 2012 09:45
| Annamalai Chockalingam
Registered: July 2009
I have been playing around with EGIT for a while now and trying to figure out how SubModules are working inside EGIT.|
Did realise that SubModule support is quiet naïve at the moment inside EGIT, I assume that's coz JAVA Projects do not need SubModule support.
When I make any changes in SubModule inside a Project, StagingView doesn't react, as it is treated by StagingView as a Resource inside a Project.
I did try to better understand this code. I have attempted to but my understanding in the best possible way to make you realise where I stand with EGIT Submodules.
Was wondering if you could give me any sort of support or direction on how to move further. Also would be happy to get a feedback from you on my understanding of StagingView as documented below and also if the approach is right.
My Understanding of StagingView
- On StagingView -> reactToSelection is invokved. This validates if the selection is coming from Repository View or from Project Explorer.
- On Validation, finds the Project Repository by calling getRepository and tries to load the same.
- When I select a SubModule, get Project Repository still returns Parent instead of returning the SubModule Repository.
- Therefore I introduced a SubModule Walk and did a Resource Validation,
- If found that selected Node belongs to a SubModule, I fetch the Repository from submodule walk and try to load the same.
- During the attempt to load the submodule, isValidRepository was failing.
- Therefore debugged further and realised that Submodule is missing in the ConfiguredRepository Map, included a piece of code to make it valid.
- Doing this, atleast whenever I select a Submodule inside a Project, I was able to load the Submodule Repo and Staging View shows the selected SubModule Title.
- But the UnstagedViewer and StagedViewer were still not working and showing all the resources as Untracked and Missing.
- On debugging further realised that Jgit needed some update. Until now I didn't change anything in Jgit.
- During TreeWalk, Working Directory for this Submodule Repo was missing or not configured properly.
- Therefore failing and marking the resources as Untracked and Missing.
- I changed a bit of the code inside TreeWalk and StagedViewer and UnstagedViewer also started working for Files inside submodule
- Now I am stuck with Folders, if my Submodule has Folders then the whole eGIT gets into Re-Indexing errors. I realised the problem is in getPath.
Looking forward to your reply.
Powered by FUDForum
. Page generated in 0.01778 seconds