1. 26 Feb, 2020 1 commit
    • Kirill Smelkov's avatar
      NXD Teach GitLab about patches · de373fe8
      Kirill Smelkov authored
      Teach GitLab not only to merge changes from a merge-request, but also to
      apply patches posted to merge-request in a way like `git am` would do -
      without merge commit and directly on top of current branch. Which way to
      go is selected by user in web UI, and apply patches is the first option.
      
      There are 3 cases:
      
      - only 1 commit is present in MR -> the only available option is to
        apply that single commit as one patch without a merge
      
        ( There is no need for merge commit in this case at all: information
          about user who applied the patch goes to "Committer" field in resultant
          commit. Avoiding 1 merge per 1 patch results in cleaner history )
      
        It is also possible to review patch description directly in web UI,
        before doing the actual application, and correct / amend it as needed.
      
      - several commits are present in MR:
      
        * it is possible to apply the patches directly on top of current
          branch. Again information about who applied what goes to "Committer"
          field.
      
        * it is possible to merge MR changes with making a merge commit.
      
          This variant is useful, when patches from a MR do several logical
          steps to reach one goal, and MR description contain cover letter for
          whole patch series.
      
          in this case original commits stay untouched and resulting merge
          will contain MR author as author, user who accepted MR as committer,
          and cover letter as merge commit message.
      
          NOTE we avoid useless "Merge branch X into Y" in merge message, and
              just put MR title into merge subject and MR description into merge
              description.
      
              This way it is more logical with more important information in
              merge subject and thus e.g. more handy to oversee what a merge brings,
              just by it subject, e.g. via looking at updates via
      
                  gitk --first-parent ...
      
              or via web.
      
      NOTE for pre-generated references to merge-request we now use full MR
          URL, instead of !<MR-n>. Full URLs work everywhere, not only on
          original site where MR was created, or even only in original repo
          and not its fork on the same site.
      
      94ddf244
      fixup! NXD Teach GitLab about patches
      
      commit_with_hooks was replaced by GitOperationService: see https://gitlab.com/gitlab-org/gitlab-ce/commit/a52dc7cec70ef97b2755fb9cef7d6b489062310c
      
      12a773b6
      fixup! NXD Teach GitLab about patches: include merge description message
      
      Include Merge description message in apply_patches and merge as topic by default. User can disable description in merge message by clicking on `Don't include description in commit message`.
      
      /reviewed-on !4
      de373fe8
  2. 10 Feb, 2020 7 commits
  3. 07 Feb, 2020 1 commit
  4. 08 Nov, 2017 2 commits
  5. 07 Nov, 2017 2 commits
  6. 16 Oct, 2017 2 commits
  7. 14 Oct, 2017 5 commits
  8. 13 Oct, 2017 1 commit
  9. 12 Oct, 2017 7 commits
  10. 10 Oct, 2017 1 commit
  11. 04 Oct, 2017 3 commits
  12. 03 Oct, 2017 3 commits
  13. 02 Oct, 2017 1 commit
    • Stan Hu's avatar
      Fix gitlab rake:import:repos task · 7ac4e2b2
      Stan Hu authored
      This backports !14597 for the 9.5.x branch.
      
      Because of a change in GitLab 9.5.4 to prevent users from assuming control of
      a repository already on disk, the import task broke. Imports would fail with
      the message, "There is already a repository with that name on disk".
      
      This change skips the validation when the import is done from the
      command-line.
      
      Closes #37682
      7ac4e2b2
  14. 29 Sep, 2017 2 commits
  15. 28 Sep, 2017 2 commits