{"action":"created","issue":{"url":"https://api.github.com/repos/gocd/gocd/issues/3635","repository_url":"https://api.github.com/repos/gocd/gocd","labels_url":"https://api.github.com/repos/gocd/gocd/issues/3635/labels{/name}","comments_url":"https://api.github.com/repos/gocd/gocd/issues/3635/comments","events_url":"https://api.github.com/repos/gocd/gocd/issues/3635/events","html_url":"https://github.com/gocd/gocd/issues/3635","id":240916489,"number":3635,"title":"GoCD fails to update git submodules","user":{"login":"dyang","id":33833,"avatar_url":"https://avatars1.githubusercontent.com/u/33833?v=4","gravatar_id":"","url":"https://api.github.com/users/dyang","html_url":"https://github.com/dyang","followers_url":"https://api.github.com/users/dyang/followers","following_url":"https://api.github.com/users/dyang/following{/other_user}","gists_url":"https://api.github.com/users/dyang/gists{/gist_id}","starred_url":"https://api.github.com/users/dyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyang/subscriptions","organizations_url":"https://api.github.com/users/dyang/orgs","repos_url":"https://api.github.com/users/dyang/repos","events_url":"https://api.github.com/users/dyang/events{/privacy}","received_events_url":"https://api.github.com/users/dyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-06T10:44:47Z","updated_at":"2017-09-08T21:15:11Z","closed_at":null,"author_association":"NONE","body":"##### Issue Type\r\n\r\n- Bug Report\r\n\r\n##### Summary\r\n\r\nWe have a git repository with several submodules. One of the submodule has a logical name that is different from its path, i.e. it was added with the --name option, so the resulting .gitmodule looks something like this:\r\n\r\n```\r\n[submodule \"SharedRepo\"]\r\n        path = ios-common\r\n        url = <the git url>\r\n```\r\nNote that the logical name \"SharedRepo\" differs from the path \"ios-common\".\r\n\r\nWhen GoCD tries to update materials, it fails with the following logs:\r\n\r\n```\r\npr|15:48:23.993 [GIT] Updating git sub-modules\r\npr|15:48:49.459 [GIT] Cleaning unversioned files and sub-modules\r\npr|15:48:49.460 [GIT] Git sub-module status\r\npr|15:48:49.587  6a92a728d8a8466aacdfdfbb3660b1c132d89e56 ios-build (6a92a72)\r\npr|15:48:49.668  80d52a724db33739024564b93d3a854749e327e5 ios-common (RELEASE_3_9_0)\r\npr|15:48:49.771 [GIT] Cleaning all unversioned files in working copy\r\n&2|15:48:49.891 Working directory \"/Users/dyang/Library/Application Support/Go Agent/pipelines/testpipeline/SharedRepo\" does not exist!\r\n```\r\n\r\n###### Basic environment details\r\n\r\n* Go Version: 17.7.0 (5147-53fdb1b15184f93966059a42429bf9ed0bfdee59)\r\n* JAVA Version: 1.8.0_91\r\n* OS: Mac OS X 10.12.5\r\n\r\n##### Steps to Reproduce\r\n\r\n1. Create a dummy git repo to use as material\r\n2. Add a submodule to this repo by running `git submodule add --name <some_name> <git_repo>`\r\n3. Commit the submodule addition to the dummy git repo\r\n4. In GoCD, set up a pipeline that uses the dummy git repo\r\n5. Trigger the pipeline\r\n\r\n##### Expected Results\r\n\r\nGoCD should be able to update to the correct git and submodule commits.\r\n\r\n##### Actual Results\r\n\r\nGoCD fails at fetching material with an error message 'Working directory ..../<pipeline_name>/<logical_name> does not exist!'\r\n"},"comment":{"url":"https://api.github.com/repos/gocd/gocd/issues/comments/328215605","html_url":"https://github.com/gocd/gocd/issues/3635#issuecomment-328215605","issue_url":"https://api.github.com/repos/gocd/gocd/issues/3635","id":328215605,"user":{"login":"dyang","id":33833,"avatar_url":"https://avatars1.githubusercontent.com/u/33833?v=4","gravatar_id":"","url":"https://api.github.com/users/dyang","html_url":"https://github.com/dyang","followers_url":"https://api.github.com/users/dyang/followers","following_url":"https://api.github.com/users/dyang/following{/other_user}","gists_url":"https://api.github.com/users/dyang/gists{/gist_id}","starred_url":"https://api.github.com/users/dyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyang/subscriptions","organizations_url":"https://api.github.com/users/dyang/orgs","repos_url":"https://api.github.com/users/dyang/repos","events_url":"https://api.github.com/users/dyang/events{/privacy}","received_events_url":"https://api.github.com/users/dyang/received_events","type":"User","site_admin":false},"created_at":"2017-09-08T21:15:11Z","updated_at":"2017-09-08T21:15:11Z","author_association":"NONE","body":"@helmesjo I can run `git update --init --recursive` etc with this submodule from command line without any problem. "}}
{"actor":{"display_login":"dyang"}}