Status: New
Owner: ----
Labels: Type-Bug Priority-Minor
New issue 1312 by la...@lancehudson.com: Can't get relative submodule
subscriptions to work
http://code.google.com/p/gerrit/issues/detail?id=1312
Affected Version: 2.3-RC0
What steps will reproduce the problem?
1. Create two projects (A and B)
2. Clone project A locally
3. Create a .gitmodules file in project A
[submodule "B"]
path = B
url = ../B.git
branch = refs/heads/master
4. git submodule init (to check .gitmodules created correctly)
5. git submodule update (to create gitlink)
6. Commit and push the git link and .gitmodule
7. Clone project B locally
8. make changes in project B
9. Commit changes in project B
10. pull project A
11. git submodule update
12. change is not downloaded in submodule (gitlink was not updated)
What is the expected output? What do you see instead?
The gitlink would have been updated and the changes would have shown up in
the submodule dir.
Please provide any additional information below.
I also have connected to the mysql database running this and do not see a
subscription in the reviewdb.submodule_subscriptions table.
Looking at the code
/gerrit/gerrit-server/src/main/java/com/google/gerrit/server/util/Submodule SectionParser.java
L84
boolean urlIsRelative = url.startsWith("/");
It looks like gerrit requires relative submodules to begin with a '/'. I
have been unable to get git (msysgit 1.7.9-preview20120201) to work
properly with a submodule url starting with '/' or './', only '../' works.
Before going about the patching process I want to make sure I am attempting
this correctly and haven't missing anything.