Skip to content
Snippets Groups Projects
  1. Feb 20, 2020
  2. Feb 07, 2020
  3. Dec 16, 2019
  4. Sep 30, 2019
  5. Sep 18, 2019
  6. Jun 12, 2019
    • Fabio Pitino's avatar
      Expose ci_default_git_depth via project API · 3ac527b4
      Fabio Pitino authored
      Enable Get and Update of ci_default_git_depth for
      Project API.
      
      Renaming Project#default_git_depth to :ci_default_git_depth
      to give more context through the API usage.
      
      Add API documentation
      3ac527b4
  7. Jun 06, 2019
    • Krasimir Angelov's avatar
      Comment why forks get default_git_depth of 0 instead nil · b8704dce
      Krasimir Angelov authored
      and simplify ProjectCiCdSetting#set_default_git_depth
      b8704dce
    • Krasimir Angelov's avatar
      Forks get default_git_depth 0 if the origin is nil · 52673a91
      Krasimir Angelov authored
      If the origin project has no default_git_depth set (i.e. nil) set the
      fork's default_git_depth to 0
      52673a91
    • Krasimir Angelov's avatar
      Add project level git depth setting · ad9ae16d
      Krasimir Angelov authored and Fabio Pitino's avatar Fabio Pitino committed
      Introduce default_git_depth in project's CI/CD settings and set it to
      50. Use it if there is no GIT_DEPTH variable specified. Apply this
      default only to newly created projects and keep it nil for old ones
      in order to not break pipelines that rely on non-shallow clones.
      
      default_git_depth can be updated from CI/CD Settings in the UI, must be
      either nil or integer between 0 and 1000 (incl).
      
      Inherit default_git_depth from the origin project when forking projects.
      
      MR pipelines are run on a MR ref (refs/merge-requests/:iid/merge) and it
      contains unique commit (i.e. merge commit) which doesn't exist in the
      other branch/tags refs. We need to add it cause otherwise it may break
      pipelines for old projects that have already enabled Pipelines for merge
      results and have git depth 0.
      
      Document new default_git_depth project CI/CD setting
      ad9ae16d
  8. Feb 19, 2019
  9. Dec 07, 2018
    • Zeger-Jan van de Weg's avatar
      Allow public forks to be deduplicated · 896c0bdb
      Zeger-Jan van de Weg authored
      When a project is forked, the new repository used to be a deep copy of everything
      stored on disk by leveraging `git clone`. This works well, and makes isolation
      between repository easy. However, the clone is at the start 100% the same as the
      origin repository. And in the case of the objects in the object directory, this
      is almost always going to be a lot of duplication.
      
      Object Pools are a way to create a third repository that essentially only exists
      for its 'objects' subdirectory. This third repository's object directory will be
      set as alternate location for objects. This means that in the case an object is
      missing in the local repository, git will look in another location. This other
      location is the object pool repository.
      
      When Git performs garbage collection, it's smart enough to check the
      alternate location. When objects are duplicated, it will allow git to
      throw one copy away. This copy is on the local repository, where to pool
      remains as is.
      
      These pools have an origin location, which for now will always be a
      repository that itself is not a fork. When the root of a fork network is
      forked by a user, the fork still clones the full repository. Async, the
      pool repository will be created.
      
      Either one of these processes can be done earlier than the other. To
      handle this race condition, the Join ObjectPool operation is
      idempotent. Given its idempotent, we can schedule it twice, with the
      same effect.
      
      To accommodate the holding of state two migrations have been added.
      1. Added a state column to the pool_repositories column. This column is
      managed by the state machine, allowing for hooks on transitions.
      2. pool_repositories now has a source_project_id. This column in
      convenient to have for multiple reasons: it has a unique index allowing
      the database to handle race conditions when creating a new record. Also,
      it's nice to know who the host is. As that's a short link to the fork
      networks root.
      
      Object pools are only available for public project, which use hashed
      storage and when forking from the root of the fork network. (That is,
      the project being forked from itself isn't a fork)
      
      In this commit message I use both ObjectPool and Pool repositories,
      which are alike, but different from each other. ObjectPool refers to
      whatever is on the disk stored and managed by Gitaly. PoolRepository is
      the record in the database.
      Unverified
      896c0bdb
  10. Oct 19, 2018
    • Bob Van Landuyt's avatar
      Remove the `ForkedProjectLink` model · f3fba178
      Bob Van Landuyt authored
      This removes the `ForkedProjectLink` model that has been replaced by
      the `ForkNetworkMember` and `ForkNetwork` combination. All existing
      relations have been adjusted to use these new models.
      
      The `forked_project_link` table has been dropped.
      
      The "Forks" count on the admin dashboard has been updated to count all
      `ForkNetworkMember` rows and deduct the number of `ForkNetwork`
      rows. This is because now the "root-project" of a fork network also
      has a `ForkNetworkMember` row. This count could become inaccurate when
      the root of a fork network is deleted.
      f3fba178
  11. Aug 20, 2018
  12. Jul 17, 2018
  13. Jul 09, 2018
  14. Dec 29, 2017
  15. Dec 07, 2017
  16. Oct 07, 2017
  17. Aug 14, 2017
    • Yorick Peterse's avatar
      Cache the number of forks of a project · aef9f1eb
      Yorick Peterse authored
      The number of forks of a project doesn't change very frequently and
      running a COUNT(*) every time this information is requested can be quite
      expensive. We also end up running such a COUNT(*) query at least twice
      on the homepage of a project.
      
      By caching this data and refreshing it when necessary we can reduce
      project homepage loading times by around 60 milliseconds (based on the
      timings of https://gitlab.com/gitlab-org/gitlab-ce).
      Verified
      aef9f1eb
  18. Sep 27, 2016
    • Nick Thomas's avatar
      Enforce the fork_project permission in Projects::CreateService · 3ed80a01
      Nick Thomas authored
      Projects::ForkService delegates to this service almost entirely, but needed
      one small change so it would propagate create errors correctly.
      
      CreateService#execute needs significant refactoring; it is now right at the
      complexity limit set by Rubocop. I avoided doing so in this commit to keep the
      diff as small as possible.
      
      Several tests depend on the insecure behaviour of ForkService, so fi them up at
      the same time.
      3ed80a01
  19. Sep 01, 2016
  20. Jun 03, 2016
  21. May 25, 2016
  22. Dec 11, 2015
  23. Nov 13, 2015
  24. Oct 02, 2015
  25. Sep 18, 2015
  26. Apr 24, 2015
  27. Apr 14, 2015
  28. Apr 06, 2015
  29. Jan 24, 2015
  30. Nov 13, 2014
  31. Oct 03, 2014
  32. Sep 14, 2014
  33. Aug 25, 2014
  34. Jan 16, 2014
  35. May 03, 2013
Loading