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

error: 'pkg/docker' does not have a commit checked out #2003

Closed
miconda opened this issue Jul 8, 2019 · 9 comments
Closed

error: 'pkg/docker' does not have a commit checked out #2003

miconda opened this issue Jul 8, 2019 · 9 comments
Assignees

Comments

@miconda
Copy link
Member

miconda commented Jul 8, 2019

When I just tried to do a commit today, I got the following error:

kamailio $ git ci .
error: 'pkg/docker' does not have a commit checked out
fatal: updating files failed

It is related to the pkg/docker submodule referencing to kamailio/kamailio-ci.

Not sure if this is due to a new git version or something else, because I did commits in that folder a few days ago. git ci is an alias to git commit.

To get is sorted out, I did:

kamailio $ git submodule update pkg/docker
Submodule path 'pkg/docker' not initialized
Maybe you want to use 'update --init'?

kamailio $ git submodule update --init pkg/docker
Submodule 'pkg/docker' (https://github.com/kamailio/kamailio-ci.git) registered for path 'pkg/docker'
Cloning into '/.../kamailio/pkg/docker'...
Submodule path 'pkg/docker': checked out 'b92a1c899b8c474afadd0cf29dd7cb4ea01a3466'

Then it worked to do the commit.

I wonder if this is going to break the process we were used with, specially the installation guidelines from GIT repo. Therefore I open this item to see if we really need the to have pkg/docker submodule, or better have the docker files directly in the repo. Other options to keep things sane and simple?

Git version:

$ git --version
git version 2.22.0
@linuxmaniac
Copy link
Member

I had no problems and nothing is on pkg/docker for me

vseva@debnuc:~/projects/kamailio$ ls -lah pkg/docker/
total 8.0K
drwxr-xr-x 2 vseva vseva 4.0K Apr 11 09:52 .
drwxr-xr-x 5 vseva vseva 4.0K Apr 11 09:52 ..
vseva@debnuc:~/projects/kamailio$ git --version 
git version 2.20.1

@miconda
Copy link
Member Author

miconda commented Jul 8, 2019

@linuxmaniac - same was for me, no problems till today and I committed a few days ago in the same folder. Over the weekend I did a ports update and looking in that terminal, I see that git was updated, so it might be something specific to git version 2.22.

For clarification: git ci is an alias in my gitconfig for git commit.

@sergey-safarov
Copy link
Member

Hi Daniel @miconda, Victor @linuxmaniac
Yes, when used sub-modules, then main repo contains references to other repos.
Before commit into pkg/docker folder (sub-module) need git-clone referenced repos too.
In this case need git-clone kamailio/kamailio-ci repo.
Examples how it can be done exist here:

  1. https://git-scm.com/book/en/v2/Git-Tools-Submodules
  2. https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules

I open this item to see if we really need the to have pkg/docker submodule, or better have the docker files directly in the repo.

About reason to create dedicated repo. Please look email discussion with threads:

Sep 27, 2017 -  Docker stuff
Nov 7, 2017 - docker continuous integration image

Some Daniel sentences from this threads

As I am more involved in managing kamailio project repo on github I need to study a bit more and see the impact. As I said, my plan was to restructure/clean parts of the pkg (e.g., removing ser folder and unmaintaned specs, with a plan to discuss if it is better to relocate even the kamailio specs because more and more distros appear out there, some maintained for longer time, some not...).

For me is acceptable two cases for docker-ci image packaging scripts:

  1. external repo + submodule in main repo;
  2. all in main repo.

If you make decision to remove sub-module then I can create PR.

@miconda
Copy link
Member Author

miconda commented Jul 9, 2019

I don't want to jump to remove the sub-module right away, first trying to figure out the reason for this behaviour. As I said, so far all was fine and the submodule is there for a while.

But if the new versions of git make the process more complex for installing/maintaining git-based installations, then we should find a best way, aiming for simplicity.

Maybe is just a bug in this specific version git 2.22.0.

@henningw
Copy link
Contributor

henningw commented Jul 9, 2019

I did not saw this error yet in my daily work, will look out for it as well.

@henningw
Copy link
Contributor

henningw commented Sep 1, 2019

@miconda - do you still see this error? I did recently some installation from the wiki git installation guide, no issues related to this.

@miconda
Copy link
Member Author

miconda commented Sep 2, 2019

@henningw - see the description of the issue, usually the git commit command is not used during git installation.

@miconda
Copy link
Member Author

miconda commented Nov 15, 2019

Closing -- discussed at K dev meeting, confirming it happens, but might be just the specific git workflow approach.

The solution is to use git commit with path to files to be committed that excludes the pkg/docker/, instead of just . - for example:

git commit src/
git commit ChangeLog
git commit pkg/kamailio/

@miconda miconda closed this as completed Nov 15, 2019
@ramazans
Copy link

Closing -- discussed at K dev meeting, confirming it happens, but might be just the specific git workflow approach.

The solution is to use git commit with path to files to be committed that excludes the pkg/docker/, instead of just . - for example:

git commit src/
git commit ChangeLog
git commit pkg/kamailio/

Its worked

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

5 participants