Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How do I deal with fuel/core (new commits)
  • I'm working on a project that was originally using 1.4/master. Since then I've updated to 1.6/develop. When I:

    git status

    from my project root, it says:

    # 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)
    #   (commit or discard the untracked or modified content in submodules)
    #
    # modified:   fuel/core (new commits)

    When I:

    cd fuel/core
    git status

    it says:

    # On branch 1.6/develop
    nothing to commit (working directory clean)

    What does this mean? How do I make sure that the switch to 1.6/develop is reflected in my remote repo when I:

    git push origin master

    ?
  • If you cloned fuel/fuel locally, it contains submodules for the other repositories. Submodules are pointers to a specific commit hash in an other repository.

    If you update that other respository, or switch branches, git sees that the latest commit hash has changed, so it reports the submodule as modified.

    If you commit the fuel/core change, the submodule reference in your project will be updated, and will be from then on linked to the commit hash that identifies 1.6/develop (at the stage you updated).

    You will have to do the same for all package repositories as well, so everything points to 1.6.
  • I did clone fuel/fuel locally, and I do have the submodules setup for core and the other packages. I did:

    cd fuel/core
    git pull origin 1.6/develop
    cd ../..
    git add fuel/core
    git commit -m "update core"
    git push origin master

    That seemed to work, but now I'm attempting to clone from my bare repo to a staging repo on my server by:

    git clone --no-hardlinks --recursive /myproject.git /stage

    Everything is cloning fine except for core, which is throwing this error:

    Cloning into 'fuel/core'...
    remote: Counting objects: 26143, done.
    remote: Compressing objects: 100% (7833/7833), done.
    remote: Total 26143 (delta 18303), reused 25525 (delta 17742)
    Receiving objects: 100% (26143/26143), 4.06 MiB | 1.04 MiB/s, done.
    Resolving deltas: 100% (18303/18303), done.
    fatal: reference is not a tree: 4a9aae2712de2b9ca0978aedefe6e15e4b3a4acb

    And the fuel/core directory is empty except for the .git directory. Did I do something terribly wrong here?
  • I just did:

    cd fuel/core
    git checkout 1.6/develop

    and that restored the core files, but then when I:

    cd ../..
    git status

    it's telling me that fuel/core has new commits. I don't want to commit from the staging server. It's just supposed to pull from the bare repo. On my local machine, the fuel/core repo had to be "merged" with my existing fuel/core repo. I'm not sure why this is, as I have not made any changes in fuel/core in the history of this project. Do I need to rebase fuel/core or something?
  • This

    cd fuel/core
    git pull origin 1.6/develop
    cd ../..
    git add fuel/core
    git commit -m "update core"
    git push origin master

    Should update the submodules just fine. This is how we update the submodule references in the fuel/fuel repository all the time.

    Is that the only message or is that followed by an "unable to checkout 4a9aae2712de2b9ca0978aedefe6e15e4b3a4acb" ?

    I don't know what you did locally, but 4a9aae2712de2b9ca0978aedefe6e15e4b3a4acb is not a valid commit hash in our fuel/core repository. So I can only assume you changed something locally, and commited that change as the submodule reference.
  • I looked into it, and the 4a9aae commit is:

    Merge branch '1.6/develop' of git://github.com/fuel/core into 1.6/develop

    When I did the git pull in fuel/core it treated it as a merge. I'm not sure why, but I'm guessing it's because back when I switched from 1.4/master to 1.6/develop, there was a merge conflict that I had to resolve manually. Once again, I'm not sure why. Do I need to remove the submodule and re-add it, or is there some other way I can scrap the 4a9aae commit? The previous commit is the most recent from 1.6/develop.
  • HarroHarro
    Accepted Answer
    If you haven't changed anything, you can just empty fuel/core, and do a new clone of the core repo.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion