<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/services/projects/fork_service.rb, branch scripts-differences</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Expose ci_default_git_depth via project API</title>
<updated>2019-06-12T08:51:45+00:00</updated>
<author>
<name>Fabio Pitino</name>
<email>fpitino@gitlab.com</email>
</author>
<published>2019-06-07T11:51:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3ac527b4889b9465b2d55ca0c9317a3e8479a625'/>
<id>3ac527b4889b9465b2d55ca0c9317a3e8479a625</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Comment why forks get default_git_depth of 0 instead nil</title>
<updated>2019-06-06T12:39:46+00:00</updated>
<author>
<name>Krasimir Angelov</name>
<email>kangelov@gitlab.com</email>
</author>
<published>2019-06-06T12:39:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b8704dce72fd8992b1f785c0ffa2f2c0eab81334'/>
<id>b8704dce72fd8992b1f785c0ffa2f2c0eab81334</id>
<content type='text'>
and simplify ProjectCiCdSetting#set_default_git_depth
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and simplify ProjectCiCdSetting#set_default_git_depth
</pre>
</div>
</content>
</entry>
<entry>
<title>Forks get default_git_depth 0 if the origin is nil</title>
<updated>2019-06-06T11:22:50+00:00</updated>
<author>
<name>Krasimir Angelov</name>
<email>kangelov@gitlab.com</email>
</author>
<published>2019-06-06T11:08:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=52673a916df0f759262afa1aaa230f7d62efd554'/>
<id>52673a916df0f759262afa1aaa230f7d62efd554</id>
<content type='text'>
If the origin project has no default_git_depth set (i.e. nil) set the
fork's default_git_depth to 0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the origin project has no default_git_depth set (i.e. nil) set the
fork's default_git_depth to 0
</pre>
</div>
</content>
</entry>
<entry>
<title>Add project level git depth setting</title>
<updated>2019-06-06T08:21:18+00:00</updated>
<author>
<name>Krasimir Angelov</name>
<email>kangelov@gitlab.com</email>
</author>
<published>2019-05-30T06:40:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ad9ae16d8a44dd2523bd6e6109db9fe2da45d3a5'/>
<id>ad9ae16d8a44dd2523bd6e6109db9fe2da45d3a5</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Let users set name/path on project fork using API</title>
<updated>2019-02-19T18:49:27+00:00</updated>
<author>
<name>Balasankar "Balu" C</name>
<email>balasankar@gitlab.com</email>
</author>
<published>2019-02-18T14:17:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=39f77ad9b46d78908531a303e8a237b40fd07e7e'/>
<id>39f77ad9b46d78908531a303e8a237b40fd07e7e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow public forks to be deduplicated</title>
<updated>2018-12-07T18:18:37+00:00</updated>
<author>
<name>Zeger-Jan van de Weg</name>
<email>git@zjvandeweg.nl</email>
</author>
<published>2018-12-03T13:49:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=896c0bdbfb1a83ff5a7d0a755ac249ac2a895798'/>
<id>896c0bdbfb1a83ff5a7d0a755ac249ac2a895798</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the `ForkedProjectLink` model</title>
<updated>2018-10-19T09:57:20+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@vanlanduyt.co</email>
</author>
<published>2018-08-31T17:16:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f3fba178b931cd2ba67f81ee667893cb84e7d42f'/>
<id>f3fba178b931cd2ba67f81ee667893cb84e7d42f</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up LFS objects when creating fork relation</title>
<updated>2018-08-20T14:39:32+00:00</updated>
<author>
<name>Toon Claes</name>
<email>toon@gitlab.com</email>
</author>
<published>2018-08-02T11:30:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f4f321b9023d5aba76541f442fe1061d70186f27'/>
<id>f4f321b9023d5aba76541f442fe1061d70186f27</id>
<content type='text'>
A forked project stores its LFS objects in the `forked_from_project`.
So the LFS objects become inaccessible, and therefore delete them from
the database so they'll get cleaned up.

To be refactored when implementing
https://gitlab.com/gitlab-org/gitlab-ce/issues/39769
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A forked project stores its LFS objects in the `forked_from_project`.
So the LFS objects become inaccessible, and therefore delete them from
the database so they'll get cleaned up.

To be refactored when implementing
https://gitlab.com/gitlab-org/gitlab-ce/issues/39769
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable more frozen string in app/services/**/*.rb</title>
<updated>2018-07-17T22:19:40+00:00</updated>
<author>
<name>gfyoung</name>
<email>gfyoung17@gmail.com</email>
</author>
<published>2018-07-17T16:50:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=fbde83540449ddcf9cae6ac13d8e078695b100d4'/>
<id>fbde83540449ddcf9cae6ac13d8e078695b100d4</id>
<content type='text'>
Partially addresses #47424.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially addresses #47424.
</pre>
</div>
</content>
</entry>
<entry>
<title>Updates from `rubocop -a`</title>
<updated>2018-07-09T13:13:08+00:00</updated>
<author>
<name>Lin Jen-Shin</name>
<email>godfat@godfat.org</email>
</author>
<published>2018-07-02T10:43:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4ee08b77bc5ae11553d59c182ea8292b77699115'/>
<id>4ee08b77bc5ae11553d59c182ea8292b77699115</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
