Skip to content

subrepo pull with merge method using release/0.4.0 fails to introduce merge markers #308

Open
@chrisdtaylor

Description

@chrisdtaylor

I have a multirepo and a subrepo where the subrepo content of each has diverged significantly and I want to "sync" the subrepo content between them again. Both sides have made a number of commits since they last were in sync. I have been using the latest 0.3.1 to exchange changes until now, but at this point the rebasing of 0.3.1 is too much - I have over 300 commits I would need to rebase from the multirepo back to the subrepo. So I started playing with various other branches including release/0.4.0 to try the merge approach. Here is the command I ran:

git subrepo pull ext/foo -r path/to/subrepo -b master --verbose --debug --method merge

At the end of that, it tells me the merge failed (no surprise - I expected to need to hand-merge some things), but the instructions don't point me at something I can merge. Here's the output of the tool:

  • Merge in changes from refs/subrepo/ext/foot/fetch

git merge refs/subrepo/ext/foo/fetch
The "git merge" command failed:

You will need to finish the pull by hand. A new working tree has been
created at .git/tmp/subrepo/ext/foo so that you can resolve the conflicts
shown in the output above.

This is the common conflict resolution workflow:

  1. cd .git/tmp/subrepo/ext/foo
  2. Resolve the conflicts (see "git status").
  3. "git add" the resolved files.
  4. git commit
  5. If there are more conflicts, restart at step 2.
  6. cd path/to/multirepo
  7. git subrepo commit ext/foo
    See "git help merge" for details.

Alternatively, you can abort the pull and reset back to where you started:

  1. git subrepo clean ext/foo

See "git help subrepo" for more help.

If I cd to .git/tmp/subrepo/ext/foo and run git status, I have many files with changes and many untracked files (not expected), but none of the files have merge conflict markings. Note also that the output states that there should have been some output after the 'The "git merge" command failed:' line, but there's nothing there. It's like something just went horribly wrong and the tool gave up.

Or maybe I'm missing something? Any ideas or tips are greatly appreciated! Only other thought I had was that the use of 0.3.1 for several "syncs" up to this point might not be compatible with this release/0.4.0 branch with merging instead of rebasing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions