Skip to content

submodule.move not documented and doesn't update all refs #69

Description

@mikelikespie

Hi,

I am trying to make submodule moving easy.

submodule.move seems to get me half the way there, but it misses a couple things. In new versions of git the .git is just a textfile that references a path in the base directory. This file isn't updated if you move directory depths because it is relative.

It also doesn't update the submodule name in the .git/config which would be helpful. I'll probably be writing the code to do this, but documentation on submodule.move would help too.

Thanks,
Mike

Activity

  1. mikelikespie commented on Aug 19, 2012

    @mikelikespie
    Author

    Also the worktree value in the .git/modules//config needs to be updated

  2. Byron commented on Aug 19, 2012

    @Byron
    Member

    Hi Mike,

    Thanks for bringing this up !

    Indeed submodule.move needs to be updated to newer git versions. Currently it should do a move correctly only for git versions prior to the change in the way submodules are handled.

    Actually I have a patch for this in my mail box, kindly donated by http://www.alliedtelesis.co.nz/ , that I will upload here for completeness.

    Cheers,
    Sebastian

  3. Byron commented on Aug 19, 2012

    @Byron
    Member

    This patch is not yet verified to be working or to actually fix the issue stated here, but it is related.

    https://gist.github.com/3393470

  4. added this to the v0.3.5 - bugfixes milestone on Nov 19, 2014
  5. self-assigned this
    on Jan 19, 2015
  6. Byron commented on Jan 19, 2015

    @Byron
    Member

    In the latest revision of master and the upcoming release v0.3.6, this issue will be fixed so that .git files are fully supported. During move, these files will be rewritten with the respective relative path.

    The second part of this issue, automatically renaming submodules during move, is something I will implement when doing #238. It will only be automatic if the submodule name equals the previous submodule checkout path.

    I will close this issue once the linked issue is closed.

  7. Byron commented on Jan 19, 2015

    @Byron
    Member

    You can watch the archived development stream on youtube:

  8. added a commit that references this issue on Jul 25, 2026
    fc11a03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions