How does/will gitlab handle submodules? #58

Closed
benasher44 opened this Issue Oct 25, 2011 · 82 comments

Comments

Projects
None yet
@benasher44

See diaspora.git in gitlab demo vs github. There's a submodule link/pointer at the bottom on github.

@vsizov

This comment has been minimized.

Show comment Hide comment
@vsizov

vsizov Nov 9, 2011

Contributor

gitlab not handle submodules. And will not handle in future

Contributor

vsizov commented Nov 9, 2011

gitlab not handle submodules. And will not handle in future

@vsizov vsizov closed this Nov 9, 2011

@nicoulaj

This comment has been minimized.

Show comment Hide comment
@nicoulaj

nicoulaj Nov 9, 2011

Why ?

nicoulaj commented Nov 9, 2011

Why ?

@vsizov

This comment has been minimized.

Show comment Hide comment
@vsizov

vsizov Nov 9, 2011

Contributor

what for?

Contributor

vsizov commented Nov 9, 2011

what for?

@vsizov

This comment has been minimized.

Show comment Hide comment
@vsizov

vsizov Nov 9, 2011

Contributor

do you have example this features? Github use it?

Contributor

vsizov commented Nov 9, 2011

do you have example this features? Github use it?

@benasher44

This comment has been minimized.

Show comment Hide comment
@benasher44

benasher44 Nov 9, 2011

A lot of the projects that I work with use git submodules. If you look at https://github.com/diaspora/diaspora, you will see the last item at the top level of the files browser is a link to another git project. That's a submodule, and github has support for it. It would be great if gitlab could have this same submodule project link feature.

Basically, the project points at another git project or submodule, and it's included in the source when you clone it (have to run some other commands to clone the submodules too). Not only does it point at another project, but it also points at a specific commit of another project. This makes it really easy to just cd into your dependency (that is a submodule) and just git pull to update your project to the latest version of that dependency.

A lot of the projects that I work with use git submodules. If you look at https://github.com/diaspora/diaspora, you will see the last item at the top level of the files browser is a link to another git project. That's a submodule, and github has support for it. It would be great if gitlab could have this same submodule project link feature.

Basically, the project points at another git project or submodule, and it's included in the source when you clone it (have to run some other commands to clone the submodules too). Not only does it point at another project, but it also points at a specific commit of another project. This makes it really easy to just cd into your dependency (that is a submodule) and just git pull to update your project to the latest version of that dependency.

@vsizov

This comment has been minimized.

Show comment Hide comment
@vsizov

vsizov Nov 9, 2011

Contributor

i know what is submodules. but i do not understand what must do gitlab?

Contributor

vsizov commented Nov 9, 2011

i know what is submodules. but i do not understand what must do gitlab?

@benasher44

This comment has been minimized.

Show comment Hide comment
@benasher44

benasher44 Nov 9, 2011

Could you all have a link in the file tree where the folder would be for that git project (like a symlink almost), like github? When you click the link, it would take you to that project at that commit pointed to by the parent project.

Could you all have a link in the file tree where the folder would be for that git project (like a symlink almost), like github? When you click the link, it would take you to that project at that commit pointed to by the parent project.

@benasher44

This comment has been minimized.

Show comment Hide comment
@benasher44

benasher44 Nov 9, 2011

Even better, the way github does it is they have a link the looks like this in the file tree:

Project - commit_hash

Clicking on the project part of the link takes you to the main project tree for that submodule. Clicking on the commit_hash part of the link takes you to the project tree for that submodule but at the specified commit. Again, see https://github.com/diaspora/diaspora.

Even better, the way github does it is they have a link the looks like this in the file tree:

Project - commit_hash

Clicking on the project part of the link takes you to the main project tree for that submodule. Clicking on the commit_hash part of the link takes you to the project tree for that submodule but at the specified commit. Again, see https://github.com/diaspora/diaspora.

@benasher44

This comment has been minimized.

Show comment Hide comment
@benasher44

benasher44 Nov 11, 2011

Is ther anyway this can be reopened? Submodules are a pretty well-used feature of git, and github supports them.

Is ther anyway this can be reopened? Submodules are a pretty well-used feature of git, and github supports them.

@lafka

This comment has been minimized.

Show comment Hide comment
@lafka

lafka Nov 28, 2011

+1 would be nice to know that a submodule is included.

If you are looking at code with dependencies to a submodule it's nice to atleast know where these dependencies comes from, instead of being met by a blank directory.

lafka commented Nov 28, 2011

+1 would be nice to know that a submodule is included.

If you are looking at code with dependencies to a submodule it's nice to atleast know where these dependencies comes from, instead of being met by a blank directory.

@gavinwilliams

This comment has been minimized.

Show comment Hide comment
@gavinwilliams

gavinwilliams Dec 3, 2011

+1

+1

@benasher44

This comment has been minimized.

Show comment Hide comment
@benasher44

benasher44 Dec 8, 2011

The current version of 'grit' has support for reading the submodule information for a repo (Grit::Submodule).

The current version of 'grit' has support for reading the submodule information for a repo (Grit::Submodule).

@benasher44

This comment has been minimized.

Show comment Hide comment
@benasher44

benasher44 Jan 17, 2012

Are there any plans to include support for submodules in 2.1 Adelante?

Are there any plans to include support for submodules in 2.1 Adelante?

@tvb

This comment has been minimized.

Show comment Hide comment
@tvb

tvb Jan 6, 2013

+1 Gitlab brakes my commit link now for a submodule part

tvb commented Jan 6, 2013

+1 Gitlab brakes my commit link now for a submodule part

@ldath

This comment has been minimized.

Show comment Hide comment
@ldath

ldath Jan 21, 2013

+1

ldath commented Jan 21, 2013

+1

@saschagrunert

This comment has been minimized.

Show comment Hide comment
@saschagrunert

saschagrunert Jan 23, 2013

+1

@LoicMahieu

This comment has been minimized.

Show comment Hide comment
@LoicMahieu

LoicMahieu Feb 28, 2013

+1

+1

@jan-glx

This comment has been minimized.

Show comment Hide comment
@jan-glx

jan-glx Mar 24, 2013

+1

jan-glx commented Mar 24, 2013

+1

@santeriv

This comment has been minimized.

Show comment Hide comment
@santeriv

santeriv Apr 4, 2013

+1

santeriv commented Apr 4, 2013

+1

@nibua-r

This comment has been minimized.

Show comment Hide comment
@nibua-r

nibua-r Apr 4, 2013

+1 (I use submodules a lot)

nibua-r commented Apr 4, 2013

+1 (I use submodules a lot)

@zzjin

This comment has been minimized.

Show comment Hide comment
@zzjin

zzjin Apr 7, 2013

Contributor

+1

Contributor

zzjin commented Apr 7, 2013

+1

@helmus

This comment has been minimized.

Show comment Hide comment
@helmus

helmus Apr 25, 2013

+1

helmus commented Apr 25, 2013

+1

@fbender

This comment has been minimized.

Show comment Hide comment
@fbender

fbender Apr 28, 2013

+1
(very much needed at my university to keep the logic visible and to allow closed source code to be separated from open source code, which is then synced to github)

fbender commented Apr 28, 2013

+1
(very much needed at my university to keep the logic visible and to allow closed source code to be separated from open source code, which is then synced to github)

@dacay

This comment has been minimized.

Show comment Hide comment
@dacay

dacay May 5, 2013

+1

This feature is the main deciding point for me...

dacay commented May 5, 2013

+1

This feature is the main deciding point for me...

@eduardomello

This comment has been minimized.

Show comment Hide comment
@eduardomello

eduardomello May 15, 2013

+1

+1

@diogogmt

This comment has been minimized.

Show comment Hide comment
@diogogmt

diogogmt May 21, 2013

+1
This reminds me of the incident of the gnome dev: https://bugzilla.gnome.org/show_bug.cgi?id=698544

Question:
How does/will gitlab handle submodules?
Answer:
gitlab not handle submodules. And will not handle in future
CLOSE TICKET
Question:
Why ?
Answer:
what for?

+1
This reminds me of the incident of the gnome dev: https://bugzilla.gnome.org/show_bug.cgi?id=698544

Question:
How does/will gitlab handle submodules?
Answer:
gitlab not handle submodules. And will not handle in future
CLOSE TICKET
Question:
Why ?
Answer:
what for?

@christianpauli

This comment has been minimized.

Show comment Hide comment
@christianpauli

christianpauli May 29, 2013

+1

@shutchinson

This comment has been minimized.

Show comment Hide comment
@shutchinson

shutchinson May 31, 2013

+1

+1

@vrutkovs

This comment has been minimized.

Show comment Hide comment
@vrutkovs

vrutkovs Jun 6, 2013

+1

vrutkovs commented Jun 6, 2013

+1

@mweather

This comment has been minimized.

Show comment Hide comment
@mweather

mweather Jun 7, 2013

+1 This is a basic git and github feature and it's not uncommon to have projects that include submodules. Chef cookbooks use them quite often, for example.

mweather commented Jun 7, 2013

+1 This is a basic git and github feature and it's not uncommon to have projects that include submodules. Chef cookbooks use them quite often, for example.

@kod3000

This comment has been minimized.

Show comment Hide comment
@kod3000

kod3000 Jun 15, 2013

+1

kod3000 commented Jun 15, 2013

+1

@julianplant

This comment has been minimized.

Show comment Hide comment
@julianplant

julianplant Jun 17, 2013

+1

+1

@mmerickel

This comment has been minimized.

Show comment Hide comment
@mmerickel

mmerickel Jun 27, 2013

+1, not supporting a core feature of git is pretty silly especially one as commonly used as submodules. Why is this issue still marked as closed?

+1, not supporting a core feature of git is pretty silly especially one as commonly used as submodules. Why is this issue still marked as closed?

@Pro

This comment has been minimized.

Show comment Hide comment
@Pro

Pro Jul 10, 2013

+1. Submodules are already shown as such. The only modification needed is that if you click on the link, it should open the corresponding project in gitlab.

Pro commented Jul 10, 2013

+1. Submodules are already shown as such. The only modification needed is that if you click on the link, it should open the corresponding project in gitlab.

@fleXible

This comment has been minimized.

Show comment Hide comment
@fleXible

fleXible Jul 10, 2013

+1

+1

@nkulikov

This comment has been minimized.

Show comment Hide comment
@nkulikov

nkulikov Jul 11, 2013

@Pro, yeah it would be perfect!

@Pro, yeah it would be perfect!

@LoicMahieu

This comment has been minimized.

Show comment Hide comment
@LoicMahieu

LoicMahieu Jul 11, 2013

@vsizov Would be a nice feature, no ?

@vsizov Would be a nice feature, no ?

@h3

This comment has been minimized.

Show comment Hide comment
@h3

h3 Jul 11, 2013

The fact that this core git feature does not show up in the gitlab interface after 2 years is quite astounding.

Just appending the modules listed in the .gitmodules file after the directory listing.. it can't be that hard to implement!

I whish I knew Ruby better.. I'd do it myself.

@Pro what are you talking about ? I have the latest Gitlab running and a project with a submodule and it doesn't show up in the files at all.

h3 commented Jul 11, 2013

The fact that this core git feature does not show up in the gitlab interface after 2 years is quite astounding.

Just appending the modules listed in the .gitmodules file after the directory listing.. it can't be that hard to implement!

I whish I knew Ruby better.. I'd do it myself.

@Pro what are you talking about ? I have the latest Gitlab running and a project with a submodule and it doesn't show up in the files at all.

@t0mk

This comment has been minimized.

Show comment Hide comment
@t0mk

t0mk Sep 5, 2013

+1

t0mk commented Sep 5, 2013

+1

@Onkelborg

This comment has been minimized.

Show comment Hide comment
@Onkelborg

Onkelborg Sep 5, 2013

+1

+1

@jchristin

This comment has been minimized.

Show comment Hide comment
@jchristin

jchristin Sep 11, 2013

+1

+1

@Klobi42

This comment has been minimized.

Show comment Hide comment
@Klobi42

Klobi42 Sep 27, 2013

+1

Klobi42 commented Sep 27, 2013

+1

@bigfatbrowncat

This comment has been minimized.

Show comment Hide comment
@bigfatbrowncat

bigfatbrowncat Oct 8, 2013

Submodule with a relative url doesn't show up. My .gitmodules file looks like:

[submodule "blabla"]
    path = blabla
url=../blabla.git

blabla repo is next to this repo in GitLab, git handles it well, but there is no entry in GitLab files list named "blabla"

Submodule with a relative url doesn't show up. My .gitmodules file looks like:

[submodule "blabla"]
    path = blabla
url=../blabla.git

blabla repo is next to this repo in GitLab, git handles it well, but there is no entry in GitLab files list named "blabla"

@nkulikov

This comment has been minimized.

Show comment Hide comment
@nkulikov

nkulikov Oct 9, 2013

It is strange decision intentionally avoid submodules because in big projects they are very useful and recommended (http://lwn.net/Articles/246381/). Yeah they have some issues but there is no "silver bullet"...

nkulikov commented Oct 9, 2013

It is strange decision intentionally avoid submodules because in big projects they are very useful and recommended (http://lwn.net/Articles/246381/). Yeah they have some issues but there is no "silver bullet"...

@fatihacet

This comment has been minimized.

Show comment Hide comment
@fatihacet

fatihacet Oct 14, 2013

Contributor

+1

Contributor

fatihacet commented Oct 14, 2013

+1

@imoldman

This comment has been minimized.

Show comment Hide comment
@imoldman

imoldman Oct 31, 2013

+1, gitlab is not a TOY!!!

+1, gitlab is not a TOY!!!

@modulec

This comment has been minimized.

Show comment Hide comment
@modulec

modulec Nov 13, 2013

+1

modulec commented Nov 13, 2013

+1

Rovanion pushed a commit to Rovanion/gitlabhq that referenced this issue Nov 15, 2013

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Nov 18, 2013

Owner

Should be fixed in GitLab 6.2. See working links in this public repo https://dev.gitlab.org/samples/submodules/tree/master

Owner

dosire commented Nov 18, 2013

Should be fixed in GitLab 6.2. See working links in this public repo https://dev.gitlab.org/samples/submodules/tree/master

@christianpauli

This comment has been minimized.

Show comment Hide comment
@christianpauli

christianpauli Nov 22, 2013

It only works if you link the submodules via http(s). The url = git://github.com/chneukirchen/rack.git link is producing a protocol error:

The address wasn't understood
Firefox doesn't know how to open this address, because the protocol (git) isn't associated with any program

It only works if you link the submodules via http(s). The url = git://github.com/chneukirchen/rack.git link is producing a protocol error:

The address wasn't understood
Firefox doesn't know how to open this address, because the protocol (git) isn't associated with any program

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Nov 22, 2013

Owner

@christianpauli Can you make a public example repo at GitLab Cloud to demonstrate?

Owner

dosire commented Nov 22, 2013

@christianpauli Can you make a public example repo at GitLab Cloud to demonstrate?

@christianpauli

This comment has been minimized.

Show comment Hide comment
@christianpauli

christianpauli Nov 22, 2013

@dosire
Your own example has the issue. the rack.git submodule is linked as: git://github.com/chneukirchen/rack.git ...
https://dev.gitlab.org/samples/submodules/tree/master

I think parsing the url for the link to the repo
from: git://github.com/chneukirchen/rack.git
to: http(s)://github.com/chneukirchen/rack.git
should do the trick depending what the webserver is running (http/https)

I keep adding...sorry
I have linked submodules on my gitserver as:
git@server.com:group/repo.git
which would again result in a failure.

@dosire
Your own example has the issue. the rack.git submodule is linked as: git://github.com/chneukirchen/rack.git ...
https://dev.gitlab.org/samples/submodules/tree/master

I think parsing the url for the link to the repo
from: git://github.com/chneukirchen/rack.git
to: http(s)://github.com/chneukirchen/rack.git
should do the trick depending what the webserver is running (http/https)

I keep adding...sorry
I have linked submodules on my gitserver as:
git@server.com:group/repo.git
which would again result in a failure.

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Nov 22, 2013

Owner

@christianpauli Ah, thanks, I only tried the first two links.

I think we'll accept merge requests to rewrite the git links to http links.

Owner

dosire commented Nov 22, 2013

@christianpauli Ah, thanks, I only tried the first two links.

I think we'll accept merge requests to rewrite the git links to http links.

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Nov 25, 2013

Owner

@christianpauli We can't rewrite all git links to http, some of them might not have a http repo link (for example ones stored on Gitolite). You would need to only rewrite links to the current server and know places (gitlab.com/github.com). We will not write this code. We might accept a merge request for this but it depends on how the code ends up looking.

Owner

dosire commented Nov 25, 2013

@christianpauli We can't rewrite all git links to http, some of them might not have a http repo link (for example ones stored on Gitolite). You would need to only rewrite links to the current server and know places (gitlab.com/github.com). We will not write this code. We might accept a merge request for this but it depends on how the code ends up looking.

@christianpauli

This comment has been minimized.

Show comment Hide comment
@christianpauli

christianpauli Nov 25, 2013

@dosire that was aimed at the current server. Thank you for the answer. And thanks you and all others for gitlab. Using it and loving it!

@dosire that was aimed at the current server. Thank you for the answer. And thanks you and all others for gitlab. Using it and loving it!

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Nov 25, 2013

Owner

@christianpauli Thanks Christian, we ❤️ that you are using GitLab. I think a merge request that only modifies the url if it is aimed at the current server would be best.

Owner

dosire commented Nov 25, 2013

@christianpauli Thanks Christian, we ❤️ that you are using GitLab. I think a merge request that only modifies the url if it is aimed at the current server would be best.

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Dec 23, 2013

Owner

For people skimming this issue, GitLab supports viewing submodules, see https://dev.gitlab.org/samples/submodules/tree/master

Owner

dosire commented Dec 23, 2013

For people skimming this issue, GitLab supports viewing submodules, see https://dev.gitlab.org/samples/submodules/tree/master

@Javex

This comment has been minimized.

Show comment Hide comment
@Javex

Javex Dec 31, 2013

The thing missing here are git@server.com URLs, these don't get rewritten for me :-/

Javex commented Dec 31, 2013

The thing missing here are git@server.com URLs, these don't get rewritten for me :-/

@dosire

This comment has been minimized.

Show comment Hide comment
@dosire

dosire Dec 31, 2013

Owner

@Javex Did you read #58 (comment) ?

Owner

dosire commented Dec 31, 2013

@Javex Did you read #58 (comment) ?

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Feb 6, 2014

@dosire @Javex I have created a MR to address the questions about SSH based submodules. It can be found at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15. Maybe this will satisfy peoples needs. I know if meets mine.

ghost commented Feb 6, 2014

@dosire @Javex I have created a MR to address the questions about SSH based submodules. It can be found at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15. Maybe this will satisfy peoples needs. I know if meets mine.

@thewholelifetolearn

This comment has been minimized.

Show comment Hide comment
@thewholelifetolearn

thewholelifetolearn Feb 7, 2014

@jhollingsworth It is a great MR! We are several using submodules for our projects at work and we were hopping for such a feature.
Thanks a lot

@jhollingsworth It is a great MR! We are several using submodules for our projects at work and we were hopping for such a feature.
Thanks a lot

@yades

This comment has been minimized.

Show comment Hide comment
@yades

yades Dec 22, 2014

+1

yades commented Dec 22, 2014

+1

@anish-mp

This comment has been minimized.

Show comment Hide comment
@anish-mp

anish-mp Oct 19, 2015

+1

+1

@FallingSnow

This comment has been minimized.

Show comment Hide comment
@FallingSnow

FallingSnow Nov 7, 2015

+1

+1

@spanjeta

This comment has been minimized.

Show comment Hide comment
@spanjeta

spanjeta Nov 18, 2015

+1

+1

@FlimFlam

This comment has been minimized.

Show comment Hide comment
@FlimFlam

FlimFlam Dec 6, 2015

+1

FlimFlam commented Dec 6, 2015

+1

@bugratari

This comment has been minimized.

Show comment Hide comment
@bugratari

bugratari Dec 11, 2015

+1 correct resolution of the submodule URL to be considered please!

+1 correct resolution of the submodule URL to be considered please!

@htdocs

This comment has been minimized.

Show comment Hide comment
@htdocs

htdocs Jan 27, 2016

+1

htdocs commented Jan 27, 2016

+1

@KeitIG

This comment has been minimized.

Show comment Hide comment
@KeitIG

KeitIG Feb 10, 2016

+1

KeitIG commented Feb 10, 2016

+1

@lucianenache

This comment has been minimized.

Show comment Hide comment
@lucianenache

lucianenache Feb 16, 2016

+1

+1

@RPGillespie6

This comment has been minimized.

Show comment Hide comment
@RPGillespie6

RPGillespie6 Feb 26, 2016

+1

+1

@anthonymonori

This comment has been minimized.

Show comment Hide comment
@anthonymonori

anthonymonori Mar 4, 2016

Any update on this? Still no plans on supporting this on GitLab in the near future?

Any update on this? Still no plans on supporting this on GitLab in the near future?

@aletessier

This comment has been minimized.

Show comment Hide comment
@aletessier

aletessier Mar 7, 2016

+1

+1

@Razer6

This comment has been minimized.

Show comment Hide comment
@Razer6

Razer6 Mar 7, 2016

Member

GitLab does support gitmodules since version 5.x. @aletessier Which problems do you have with the integration?

Member

Razer6 commented Mar 7, 2016

GitLab does support gitmodules since version 5.x. @aletessier Which problems do you have with the integration?

@hobson

This comment has been minimized.

Show comment Hide comment
@hobson

hobson Nov 5, 2016

+1 need them for several of my projects

hobson commented Nov 5, 2016

+1 need them for several of my projects

@jwjulien

This comment has been minimized.

Show comment Hide comment
@jwjulien

jwjulien Mar 22, 2017

+1

+1

@niclaslindstedt

This comment has been minimized.

Show comment Hide comment
@niclaslindstedt

niclaslindstedt Dec 28, 2017

+1

@anthonymonori

This comment has been minimized.

Show comment Hide comment
@anthonymonori

anthonymonori Dec 28, 2017

This is closed for a reason, but I also hope they could lock these conversations down now. GitLab does not follow the discussion here, but rather on:

So if people have troubles with this (it is working), they should request help over there.

anthonymonori commented Dec 28, 2017

This is closed for a reason, but I also hope they could lock these conversations down now. GitLab does not follow the discussion here, but rather on:

So if people have troubles with this (it is working), they should request help over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment