This repository was archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Dealing with Alcor Submodule
Eric Li edited this page Mar 15, 2021
·
3 revisions
ACA relies on the protobuf schema located under Alcor repro, therefore, it has a submodule to Alcor to use it.
ericli@Erics-MacBook-Pro aca-dev % git status
On branch perf/hashtable
Your branch is up to date with 'origin/perf/hashtable'.
nothing to commit, working tree clean
ericli@Erics-MacBook-Pro aca-dev % ls
CMakeCache.txt LICENSE SCHEDULE.md cmake_install.cmake include
CMakeFiles Makefile alcor docs src
CMakeLists.txt README.md build etc testNoticed git status shows a clean state and the alcor directory under aca.
In the event that a user move the Alcor submodule in the local branch unintentionally (that could happen when switching a development branch which points to a different Alcor submodule):
ericli@Erics-MacBook-Pro aca-dev % cd alcor
ericli@Erics-MacBook-Pro alcor % git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
ericli@Erics-MacBook-Pro alcor % git pull
remote: Enumerating objects: 346, done.
remote: Counting objects: 100% (346/346), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 675 (delta 273), reused 325 (delta 268), pack-reused 329
Receiving objects: 100% (675/675), 1.70 MiB | 2.70 MiB/s, done.
Resolving deltas: 100% (318/318), completed with 135 local objects.
From https://github.com/futurewei-cloud/alcor
2d1490d..0f3f99d master -> origin/master
ericli@Erics-MacBook-Pro alcor % cd ..
ericli@Erics-MacBook-Pro aca-dev % git status
On branch perf/hashtable
Your branch is up to date with 'origin/perf/hashtable'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: alcor (new commits)
no changes added to commit (use "git add" and/or "git commit -a")
ericli@Erics-MacBook-Pro aca-dev %try to do the below to see if that fixes it:
ericli@Erics-MacBook-Pro aca-dev % git submodule update --init --recursiveYou can also move Alcor submodule back to the offical master’s location seen at: https://github.com/futurewei-cloud/alcor-control-agent (e.g. alcor @ 2d1490d)
ericli@Erics-MacBook-Pro aca-dev % cd alcor
ericli@Erics-MacBook-Pro alcor % git checkout 2d1490d
Note: checking out '2d1490d'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 2d1490d [Contract] Update Contract for DNS/Router, Resolve Discrepancy (#484)
ericli@Erics-MacBook-Pro alcor % git status
HEAD detached at 2d1490d
nothing to commit, working tree clean
ericli@Erics-MacBook-Pro alcor % cd ..
ericli@Erics-MacBook-Pro aca-dev % git status
On branch perf/hashtable
Your branch is up to date with 'origin/perf/hashtable'.
nothing to commit, working tree clean