Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-5436

Support auto fast-forwarding submodules during merges by having submodule initialized

    XMLWordPrintable

Details

    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      During merge from commit R into local commit L, with some merge-base B, if they refer to corresponding commits R' L' and B' in a submodule, and those are different, Git (and stash) will report a merge conflict. But, if the merge is performed in local reporitory, and the submodule is checked-out, git will inspect its history and check if L' is a ancestor of R'. If it is, it will fast-forward the submodule to R' without reporting conflict. It works since https://github.com/git/git/commit/68d03e4a6e44

      If stash could perform this in server-side merges it would let go most of the conflicts complaints developers experience with submodules. One way to achieve it is to just have the submodules initialized in the server repository (it is possible to avoid prformance issues with use of alternate object storage and skip-worktree flag), but I'm not sure how will it affect other functionality, it can break something.

      Attachments

        Activity

          People

            Unassigned Unassigned
            8ad8bd9bec9d Maksim Kirillov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: