Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339309

Summary: Git status command doesn't show up when repository is a parent
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: Szymon Brandys <Szymon.Brandys>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, libingw, Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-03-08 22:38:32 EST
N20110308-2000

Create a project with a local file system path at the root of a git repository. Observe that the "Git status" command shows up in the list of actions available for the project.

Now create a project with a location inside a git repository working tree. For example, point to a single project in the org.eclipse.orion.client.git repository.

Notice that the "Git status" command no longer shows up. If I craft the URL by hand, I can see that the git status page indeed works in this case, but the user has no way to navigate to the git status page.
Comment 1 Boris Bokowski CLA 2011-03-09 08:09:23 EST
John, did you file this because it means that the Git Status command is not available for the new auto-generated Git repositories (bug 339310)? I would suggest fixing that by auto-creating one repository per project instead of one per user.

There is another problem with Git Status though - I would expect the command to show up for projects (top level folders) that are GIt repositories, but currently you have to navigate into it first and select Git Status for one of its children. Then, as a result, the Git Status page only shows changes in that child folder, not for the whole project. This is  unexpected for a typical Git user since on the command line, "git status" reports all changes in the Git repository, not just the ones under the current directory.

This is even potentially dangerous, assuming that the commit operation commits all staged changes in the current repository. I haven't been able to reproduce this with the new auto-generated Git repositories, but for my existing setup where I have a project for the Orion client code, I can go to this page where I see all unstaged changes:

http://localhost:8080/git-status.html#http://localhost:8080/git/status/file/L

But if I use the Git Status command I can end up on this page instead where I don't see changes in other directories:

http://localhost:8080/git-status.html#http://localhost:8080/git/status/file/L/bundles/org.eclipse.orion.client.editor/web/
Comment 2 Szymon Brandys CLA 2011-03-09 08:25:18 EST
(In reply to comment #0)
> Notice that the "Git status" command no longer shows up. If I craft the URL by
> hand, I can see that the git status page indeed works in this case, but the user
> has no way to navigate to the git status page.

John, it works for me. Maybe the fix for Bug 339204 helped her too. Boris, you should see Git Status for top-level folders too. Could you verify that?
Comment 3 Boris Bokowski CLA 2011-03-09 08:43:41 EST
Yes, I do see Git Status for top level folders now.

Could we either hide the Git Status command for other resources, or make it go to git-status.html with a path after the hash that corresponds to the containing project, so that I always see the complete picture?
Comment 4 Szymon Brandys CLA 2011-03-09 09:12:19 EST
(In reply to comment #3)
> Could we either hide the Git Status command for other resources, or make it go
> to git-status.html with a path after the hash that corresponds to the containing
> project, so that I always see the complete picture?

Bug 339351
Comment 5 Szymon Brandys CLA 2011-03-09 09:14:15 EST
John, is your issue fixed too?
Comment 6 Szymon Brandys CLA 2011-03-10 05:21:56 EST
This is fixed.