Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Update Submodules should fetch all published commits in submodules before calling git submodule update #1972

Closed
marknuzz opened this issue Apr 22, 2016 · 2 comments

Comments

@marknuzz
Copy link

marknuzz commented Apr 22, 2016

I have a submodule that is set to use a branch that is not merged into the default (master) branch. The branch I am using is called "dev".

When a deployment is triggered in Kudu, it fails with the following command, with the following error message:

git.exe submodule update --init --recursive

fatal: reference is not a tree: 0a1fd6dc0ac024378610ec25ec74dcd8400bb478
Unable to checkout '0a1fd6dc0ac024378610ec25ec74dcd8400bb478' in submodule path ...

If I run the following commands from the debug console (some of the same commands Kudu uses on the main repo...), the submodule update works fine after that

cd [submoduledir]
git.exe remote add -t dev external [remoteurl]
git.exe fetch external --progress

The -t dev arguments are probably not needed, they just happened to be the ones I used.

if the remote add command fails with "remote external already exists.", remove the remote and re-add it (better than doing nothing because the remote url could have changed in the submodule).

Here's the file that could be a starting point for what to change: https://github.com/projectkudu/kudu/blob/master/Kudu.Core/SourceControl/Git/GitExeRepository.cs

I imagine it would require parsing the .gitmodules file to locate the submodule directories and branches. I would submit a patch myself but was hoping someone with more familiarity with the project's build and testing process, could fix this more efficiently if I provided enough information.

(Edited out last command that was not necessary)

@marknuzz
Copy link
Author

The FetchWithoutConflict method looks promising too.

@jvano
Copy link
Member

jvano commented Apr 29, 2024

Hi

Kudu will continue to run in Azure App Service. However, this repo will no longer be maintained.
If the problem persists and is related to running on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano
Azure App Service

@jvano jvano closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants