Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349428 - [server][git] Wrong cloneLocation in git log toRef
Summary: [server][git] Wrong cloneLocation in git log toRef
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-15 09:04 EDT by Piotr Janik CLA
Modified: 2011-09-01 11:42 EDT (History)
3 users (show)

See Also:
tomasz.zarna: review+
simon_kaegi: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Janik CLA 2011-06-15 09:04:52 EDT
example:
repository: /file/f
GET /gitapi/commit/master/file/f/subfolder/?page=1

toRef structure:
"toRef": {
    "CloneLocation": "/gitapi/clone/file/f/subfolder/",
    "CommitLocation": "/gitapi/commit/master/file/f/subfolder/",
    "Current": true,
    "HeadLocation": "/gitapi/commit/HEAD/file/f/subfolder/",
    "Location": "/gitapi/branch/master/file/f/subfolder/",
    "Name": "master",
    "RemoteLocation": "/gitapi/remote/origin/master/file/f/subfolder/",
    "Type": "Branch"
  }
  
  cloneLocation is wrong, should be: "/gitapi/clone/file/f/".
Comment 1 Piotr Janik CLA 2011-06-15 09:15:34 EDT
Fix: https://github.com/pjanik/orion.server/tree/bug349428

I wrote all this code and have the rights to contribute it to Eclipse under the
eclipse.org web site terms of use.
Comment 2 Tomasz Zarna CLA 2011-06-20 12:33:06 EDT
The fix looks good, the CloneLocation should point to the root.
Comment 3 Szymon Brandys CLA 2011-06-20 13:39:49 EDT
The correct CloneLocation is important. This is the case.

1) Create a clone of org.eclipse.orion.client in Orion
2) Open Git Log for a subfolder e.g. bundles/org.eclipse.orion.client.core
You will see "Git Log for local branch master on" and no branch name

When the fix is applied you'll see "Git Log for local branch master on org.eclipse.orion.client".
Comment 4 Simon Kaegi CLA 2011-06-20 17:04:32 EDT
Looks good, safe enough and worth doing. If anything the path math is simpler. Pushed.
Comment 5 Szymon Brandys CLA 2011-06-21 04:21:21 EDT
The final fix is different from the Piotrek's one.
Comment 6 Szymon Brandys CLA 2011-08-02 06:14:43 EDT
The fix is here http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=30c54dee0e70ff60a24d63b86972a01f60d06245
It is different that Piotrek's one as stated in comment 5.