Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
9382784640
commit
50cf1faa7b
|
|
@ -45,9 +45,13 @@ db:rollback single-db:
|
|||
- .single-db
|
||||
- .rails:rules:single-db
|
||||
|
||||
# https://docs.gitlab.com/ee/development/database/dbmigrate:multi-version-upgrade-job.html
|
||||
db:migrate:multi-version-upgrade:
|
||||
extends:
|
||||
- .db-job-base
|
||||
- .rails:rules:db:migrate:multi-version-upgrade
|
||||
variables:
|
||||
ENABLE_DB_MULTI_VERSION_UPGRADE: "true"
|
||||
script:
|
||||
- curl -o latest_upgrade_stop.gz https://gitlab.com/gitlab-org/quality/pg-dump-generator/-/raw/main/pg_dumps/ee/latest_upgrade_stop.gz
|
||||
- gunzip -c latest_upgrade_stop.gz > gitlabhq_production
|
||||
|
|
@ -55,7 +59,6 @@ db:migrate:multi-version-upgrade:
|
|||
- apt-get update -qq && apt-get install -y -qq postgresql
|
||||
- psql --output /dev/null -v "ON_ERROR_STOP=1" -h postgres -U postgres -d gitlabhq_test < gitlabhq_production
|
||||
- bundle exec rake gitlab:db:configure
|
||||
allow_failure: true
|
||||
|
||||
db:migrate:reset:
|
||||
extends: .db-job-base
|
||||
|
|
|
|||
|
|
@ -1897,6 +1897,11 @@
|
|||
- <<: *if-merge-request
|
||||
changes: *decomposed-db-models-patterns
|
||||
|
||||
.rails:rules:db:migrate:multi-version-upgrade:
|
||||
rules:
|
||||
- if: '$ENABLE_DB_MULTI_VERSION_UPGRADE =~ /true|yes|1/i'
|
||||
- !reference [".rails:rules:ee-and-foss-migration", rules]
|
||||
|
||||
.rails:rules:db-backup:
|
||||
rules:
|
||||
- <<: *if-merge-request-labels-pipeline-expedite
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export default class Profile {
|
|||
this.setRepoRadio();
|
||||
this.bindEvents();
|
||||
this.initAvatarGlCrop();
|
||||
this.form.attr('data-testid', 'form-ready');
|
||||
}
|
||||
|
||||
initAvatarGlCrop() {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export default {
|
|||
computed: {
|
||||
highlighted() {
|
||||
if (this.hljs && this.languageLoaded) {
|
||||
return this.hljs.highlight(this.code, { language: this.language }).value;
|
||||
return this.hljs.default.highlight(this.code, { language: this.language }).value;
|
||||
}
|
||||
|
||||
return escape(this.code);
|
||||
|
|
@ -53,7 +53,7 @@ export default {
|
|||
try {
|
||||
const { default: languageDefinition } = await languageLoader[this.language]();
|
||||
|
||||
this.hljs.registerLanguage(this.language, languageDefinition);
|
||||
this.hljs.default.registerLanguage(this.language, languageDefinition);
|
||||
this.languageLoaded = true;
|
||||
} catch (e) {
|
||||
this.$emit('error', e);
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
end
|
||||
|
||||
def onboarding_status
|
||||
Onboarding::Status.new(params.to_unsafe_h.deep_symbolize_keys, session, @user)
|
||||
Onboarding::Status.new(request.env.fetch('omniauth.params', {}).deep_symbolize_keys, session, @user)
|
||||
end
|
||||
strong_memoize_attr :onboarding_status
|
||||
|
||||
|
|
|
|||
|
|
@ -144,10 +144,16 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
private
|
||||
|
||||
def onboarding_status
|
||||
Onboarding::Status.new(params.to_unsafe_h.deep_symbolize_keys, session, resource)
|
||||
Onboarding::Status.new(onboarding_status_params, session, resource)
|
||||
end
|
||||
strong_memoize_attr :onboarding_status
|
||||
|
||||
def onboarding_status_params
|
||||
# We'll override this in the trial registrations controller so we can add on trial param
|
||||
# and make it so we can figure out the registration_type with the same code.
|
||||
params.to_unsafe_h.deep_symbolize_keys
|
||||
end
|
||||
|
||||
def allow_flash_content?(user)
|
||||
user.blocked_pending_approval? || onboarding_status.single_invite?
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,6 +11,14 @@
|
|||
"email_opt_in": {
|
||||
"description": "Setting to guide marketing email opt-ins outside of the product. See https://gitlab.com/gitlab-org/gitlab/-/issues/435741",
|
||||
"type": "boolean"
|
||||
},
|
||||
"initial_registration_type": {
|
||||
"description": "Initial type of registration for an onboarding user",
|
||||
"type": "string"
|
||||
},
|
||||
"registration_type": {
|
||||
"description": "Current type of registration for an onboarding user",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddZoektSettingsToApplicationSettings < Gitlab::Database::Migration[2.2]
|
||||
enable_lock_retries!
|
||||
milestone '16.11'
|
||||
|
||||
def change
|
||||
add_column :application_settings, :zoekt_settings, :jsonb, default: {}, null: false
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
7f8e8cdd04b10bcdae7369c17aa2f63de91730f2937c73cf687007dde0ed9efc
|
||||
|
|
@ -4195,6 +4195,7 @@ CREATE TABLE application_settings (
|
|||
asciidoc_max_includes smallint DEFAULT 32 NOT NULL,
|
||||
clickhouse jsonb DEFAULT '{}'::jsonb NOT NULL,
|
||||
include_optional_metrics_in_service_ping boolean DEFAULT true NOT NULL,
|
||||
zoekt_settings jsonb DEFAULT '{}'::jsonb NOT NULL,
|
||||
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
|
||||
CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)),
|
||||
CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Database
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
|
||||
---
|
||||
|
||||
# db:migrate:multi-version-upgrade job
|
||||
|
||||
> - [Introduced](https://gitlab.com/groups/gitlab-org/quality/quality-engineering/-/epics/19) in GitLab 16.11.
|
||||
|
||||
This job runs on the test stage of a merge request pipeline. It validates that migrations pass
|
||||
for multi-version upgrade from the latest [required upgrade stop](../../update/index.md#required-upgrade-stops)
|
||||
to the author's working branch. It achieves it by running `gitlab:db:configure` against PostgreSQL
|
||||
dump created from the latest known [GitLab version stop](../../update/index.md#upgrade-paths) with test data.
|
||||
|
||||
The database dump is generated and maintained with [PostgreSQL Dump Generator](https://gitlab.com/gitlab-org/quality/pg-dump-generator).
|
||||
To seed database with data, the tool uses Data Seeder with [`bulk_data.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/db/seeds/data_seeder/bulk_data.rb)
|
||||
configuration to seed all factories and uses `db:seed_fu` to seed all [`db/fixtures`](../development_seed_files.md).
|
||||
Latest dump is generated automatically in scheduled pipelines for the latest patch
|
||||
release of the required stop.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Database reconfigure failures
|
||||
|
||||
This failure usually happens due to an actual migration error in your working branch.
|
||||
To reproduce the failure locally follow [Migration upgrade testing](https://gitlab.com/gitlab-org/quality/pg-dump-generator#migration-upgrade-testing)
|
||||
guidance. It outlines the steps how to import the latest PostgreSQL dump
|
||||
in your local GitLab Development Kit or GitLab Docker instance.
|
||||
|
||||
For a real-life example, refer to
|
||||
[this failed job](https://gitlab.com/gitlab-org/gitlab/-/jobs/6418619509#L4970).
|
||||
|
|
@ -7,9 +7,6 @@ description: "Introduction to using Git through the command line."
|
|||
|
||||
# Command line Git
|
||||
|
||||
[Git](https://git-scm.com/) is an open-source distributed version control system. GitLab is built
|
||||
on top of Git.
|
||||
|
||||
You can do many Git operations directly in GitLab. However, the command line is required for advanced tasks,
|
||||
like fixing complex merge conflicts or rolling back commits.
|
||||
|
||||
|
|
@ -24,7 +21,7 @@ For more information about the advantages of working with Git and GitLab:
|
|||
- Learn how [GitLab became the backbone of the Worldline](https://about.gitlab.com/customers/worldline/) development environment.
|
||||
|
||||
To help you visualize what you're doing locally, you can install a
|
||||
[Git GUI app](https://git-scm.com/download/gui/).
|
||||
[Git GUI app](https://git-scm.com/downloads/guis).
|
||||
|
||||
## Choose a terminal
|
||||
|
||||
|
|
@ -32,14 +29,15 @@ To execute Git commands on your computer, you must open a terminal (also known a
|
|||
prompt, command shell, and command line). Here are some options:
|
||||
|
||||
- For macOS users:
|
||||
- Built-in [Terminal](https://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line). Press <kbd>⌘ command</kbd> + <kbd>space</kbd> and type `terminal`.
|
||||
- [iTerm2](https://iterm2.com/). You can integrate it with [Zsh](https://git-scm.com/book/id/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Zsh) and [Oh My Zsh](https://ohmyz.sh/) for color highlighting and other advanced features.
|
||||
- Built-in [Terminal](https://support.apple.com/en-au/guide/terminal/welcome/mac).
|
||||
- [iTerm2](https://iterm2.com/). You can integrate it with [Zsh](https://git-scm.com/book/id/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Zsh)
|
||||
and [Oh My Zsh](https://ohmyz.sh/) for color highlighting and other advanced features.
|
||||
- For Windows users:
|
||||
- Built-in command line. On the Windows taskbar, select the search icon and type `cmd`.
|
||||
- [PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/overview?view=powershell-7.4).
|
||||
- Git Bash. It is built into [Git for Windows](https://gitforwindows.org/).
|
||||
- For Linux users:
|
||||
- Built-in [Linux Terminal](https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal).
|
||||
- Git Bash, which is included with [Git for Windows](https://gitforwindows.org/).
|
||||
- For Linux users, the built-in terminal. For example, the
|
||||
[Ubuntu Terminal](https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal).
|
||||
|
||||
## Confirm Git is installed
|
||||
|
||||
|
|
@ -64,13 +62,13 @@ To start using Git from your computer, you must enter your credentials
|
|||
to identify yourself as the author of your work. The full name and email address
|
||||
should match the ones you use in GitLab.
|
||||
|
||||
1. In your shell, add your full name:
|
||||
1. In your terminal, add your full name. For example:
|
||||
|
||||
```shell
|
||||
git config --global user.name "John Doe"
|
||||
git config --global user.name "Sidney Jones"
|
||||
```
|
||||
|
||||
1. Add your email address:
|
||||
1. Add your email address. For example:
|
||||
|
||||
```shell
|
||||
git config --global user.email "your_email_address@example.com"
|
||||
|
|
@ -137,9 +135,9 @@ You can also
|
|||
|
||||
### Clone with HTTPS
|
||||
|
||||
Clone with HTTPS when you want to authenticate each time you perform an operation
|
||||
between your computer and GitLab.
|
||||
[OAuth credential helpers](../user/profile/account/two_factor_authentication.md#oauth-credential-helpers) can decrease the number of times you must manually authenticate, making HTTPS a seamless experience.
|
||||
Clone with HTTPS when you want to authenticate each time you perform an operation between your computer and GitLab.
|
||||
[OAuth credential helpers](../user/profile/account/two_factor_authentication.md#oauth-credential-helpers) can decrease
|
||||
the number of times you must manually authenticate, making HTTPS a seamless experience.
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find the project you want to clone.
|
||||
1. On the project's overview page, in the upper-right corner, select **Code**, then copy the URL for **Clone with HTTPS**.
|
||||
|
|
@ -238,15 +236,16 @@ The `-v` flag stands for verbose.
|
|||
|
||||
To work on an up-to-date copy of the project, you `pull` to get all the changes made by users
|
||||
since the last time you cloned or pulled the project. Replace `<name-of-branch>`
|
||||
with the name of your [default branch](../user/project/repository/branches/default.md)
|
||||
to get the main branch code, or replace it with the branch name of the branch
|
||||
you are currently working in.
|
||||
with either:
|
||||
|
||||
- The name of your [default branch](../user/project/repository/branches/default.md) to get the main branch code.
|
||||
- The name of the branch you are working in.
|
||||
|
||||
```shell
|
||||
git pull <REMOTE> <name-of-branch>
|
||||
```
|
||||
|
||||
When you clone a repository, `REMOTE` is typically `origin`. This is where the
|
||||
When you clone a repository, `REMOTE` is typically `origin`. The remote is where the
|
||||
repository was cloned from, and it indicates the SSH or HTTPS URL of the repository
|
||||
on the remote server. `<name-of-branch>` is usually the name of your
|
||||
[default branch](../user/project/repository/branches/default.md), but it may be any
|
||||
|
|
@ -277,7 +276,7 @@ commit ab123c (HEAD -> main, origin/main, origin/HEAD)
|
|||
When a reference is changed in the local repository, Git records the change
|
||||
in its **reference logs**. You can display the contents of the reference logs
|
||||
if you need to find the old values of a reference. For example, you might want
|
||||
to display the changes to `HEAD` in order to undo a change.
|
||||
to display the changes to `HEAD` to undo a change.
|
||||
|
||||
To display the list of changes to `HEAD`:
|
||||
|
||||
|
|
@ -461,8 +460,7 @@ you must [force an update](../topics/git/git_rebase.md#force-pushing).
|
|||
|
||||
## Delete changes
|
||||
|
||||
If you make a mistake and want to undo your changes, you can use Git
|
||||
commands to go back to an earlier version of a repository.
|
||||
If want to undo your changes, you can use Git commands to go back to an earlier version of a repository.
|
||||
|
||||
Deleting changes is often an irreversible, destructive action. If
|
||||
possible, you should add additional commits instead of reverting old
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ A typical Git user encounters these concepts soon after starting to use Git:
|
|||
- [`git add`](../../gitlab-basics/add-file.md) to start tracking files with Git.
|
||||
- [Tags](../../user/project/repository/tags/index.md) and
|
||||
[branches](../../user/project/repository/branches/index.md).
|
||||
- [How to undo mistakes](undo.md),
|
||||
including [`git reset`](rollback_commits.md).
|
||||
- [How to undo changes](undo.md), including [`git reset`](rollback_commits.md).
|
||||
- View a chronological list of changes to a file with
|
||||
[Git history](../../user/project/repository/git_history.md).
|
||||
- View a line-by-line editing history of a file with
|
||||
|
|
@ -105,13 +104,13 @@ Git and GitLab, combined together, provide advanced features for repository mana
|
|||
### Git Large File Storage (LFS)
|
||||
|
||||
Many Git projects must manage large binary assets, such as videos and images.
|
||||
Implementing Git Large File Storage can help manage these assets while keeping
|
||||
Implementing [Git Large File Storage](https://git-lfs.com) can help manage these assets while keeping
|
||||
your repository small:
|
||||
|
||||
- [User documentation](lfs/index.md) for Git LFS at GitLab
|
||||
- [Administrator documentation](../../administration/lfs/index.md) for Git LFS at GitLab
|
||||
- Blog post: [Getting Started with Git LFS](https://about.gitlab.com/blog/2017/01/30/getting-started-with-git-lfs-tutorial/)
|
||||
- [Migrate an existing Git repository](lfs/migrate_to_git_lfs.md) with Git LFS
|
||||
- [Migrate an existing Git repository](lfs/index.md#migrate-an-existing-repository-to-git-lfs) to Git LFS
|
||||
- [Remove objects](lfs/index.md#removing-objects-from-lfs) from Git LFS
|
||||
- Blog post: [Towards a production-quality open source Git LFS server](https://about.gitlab.com/blog/2015/08/13/towards-a-production-quality-open-source-git-lfs-server/)
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ your operating system. GitLab requires version 1.0.1 or later of the Git LFS cli
|
|||
- Git LFS v1 original API is not supported, because it was deprecated early in LFS
|
||||
development.
|
||||
- When SSH is set as a remote, Git LFS objects still go through HTTPS.
|
||||
- Any Git LFS request asks for HTTPS credentials, so we recommend a good Git
|
||||
- Any Git LFS request asks for HTTPS credentials, so you should use a good Git
|
||||
credentials store.
|
||||
- Git LFS always assumes HTTPS so if you have GitLab server on HTTP you must
|
||||
[add the URL to Git configuration manually](troubleshooting.md#getsockopt-connection-refused).
|
||||
|
|
|
|||
|
|
@ -1,189 +1,11 @@
|
|||
---
|
||||
stage: none
|
||||
group: unassigned
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
description: "How to migrate an existing Git repository to Git LFS with BFG."
|
||||
redirect_to: 'index.md'
|
||||
remove_date: '2024-06-28'
|
||||
---
|
||||
|
||||
# Migrate a Git repository into Git LFS with BFG
|
||||
This document was moved to [another location](index.md).
|
||||
|
||||
WARNING:
|
||||
The following documentation is deprecated. We recommend using
|
||||
[`git lfs migrate`](https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-migrate.adoc)
|
||||
instead of the method documented below.
|
||||
|
||||
Using Git LFS can help you to reduce the size of your Git
|
||||
repository and improve its performance.
|
||||
|
||||
However, adding the large files that are already in your repository to Git LFS
|
||||
doesn't actually reduce the size of your repository because
|
||||
the files are still referenced by previous commits.
|
||||
|
||||
Through the method described on this document, first migrate
|
||||
to Git LFS with a tool such as the open source community-maintained [BFG](https://rtyley.github.io/bfg-repo-cleaner/)
|
||||
through a mirror repository, then clean up the repository's history,
|
||||
and lastly create LFS tracking rules to prevent new binary files
|
||||
from being added.
|
||||
|
||||
This tutorial was inspired by the guide
|
||||
[Use BFG to migrate a repository to Git LFS](https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/).
|
||||
For more information on Git LFS, see the [references](#references)
|
||||
below.
|
||||
|
||||
WARNING:
|
||||
The method described on this guide rewrites Git history. Make
|
||||
sure to back up your repository before beginning and use it at your
|
||||
own risk.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before beginning, make sure:
|
||||
|
||||
- You have enough LFS storage for the files you want to convert.
|
||||
Storage is required for the entire history of all files.
|
||||
- All the team members you share the repository with have pushed all changes.
|
||||
Branches based on the repository before applying this method cannot be merged.
|
||||
|
||||
To follow this tutorial, you need:
|
||||
|
||||
- The Maintainer role for the existing Git repository
|
||||
you'd like to migrate to LFS with access through the command line.
|
||||
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
||||
and [Java Runtime Environment](https://www.java.com/en/download/manual.jsp)
|
||||
(Java 7 or above) installed locally.
|
||||
- BFG installed locally:
|
||||
|
||||
```shell
|
||||
brew install bfg
|
||||
```
|
||||
|
||||
- Git LFS installed locally:
|
||||
|
||||
```shell
|
||||
brew install git-lfs
|
||||
```
|
||||
|
||||
NOTE:
|
||||
This guide was tested on macOS Mojave.
|
||||
|
||||
## Steps
|
||||
|
||||
Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-repo-migration.git`.
|
||||
|
||||
1. Back up your repository:
|
||||
|
||||
Create a copy of your repository so that you can
|
||||
recover it in case something goes wrong.
|
||||
|
||||
1. Clone `--mirror` the repository:
|
||||
|
||||
Cloning with the mirror flag creates a bare repository.
|
||||
This ensures you get all the branches within the repository.
|
||||
|
||||
It creates a directory called `<repo-name>.git`
|
||||
(in our example, `test-git-lfs-repo-migration.git`),
|
||||
mirroring the upstream project:
|
||||
|
||||
```shell
|
||||
git clone --mirror git@gitlab.com:gitlab-tests/test-git-lfs-repo-migration.git
|
||||
```
|
||||
|
||||
1. Convert the Git history with BFG:
|
||||
|
||||
```shell
|
||||
bfg --convert-to-git-lfs "*.{png,mp4,jpg,gif}" --no-blob-protection test-git-lfs-repo-migration.git
|
||||
```
|
||||
|
||||
It is scanning all the history, and looking for any files with
|
||||
that extension, and then converting them to an LFS pointer.
|
||||
|
||||
1. Clean up the repository:
|
||||
|
||||
```shell
|
||||
# Change into the mirror repo directory:
|
||||
cd test-git-lfs-repo-migration.git
|
||||
|
||||
# Clean up the repo:
|
||||
git reflog expire --expire=now --all && git gc --prune=now --aggressive
|
||||
```
|
||||
|
||||
You can also take a look on how to further [clean the repository](../../../user/project/repository/reducing_the_repo_size_using_git.md),
|
||||
but it's not necessary for the purposes of this guide.
|
||||
|
||||
1. Install Git LFS in the mirror repository:
|
||||
|
||||
```shell
|
||||
git lfs install
|
||||
```
|
||||
|
||||
1. [Unprotect the default branch](../../../user/project/protected_branches.md),
|
||||
so that we can force-push the rewritten repository:
|
||||
|
||||
1. Go to your project's **Settings > Repository** and
|
||||
expand **Protected branches**.
|
||||
1. Scroll down to locate the protected branches and select
|
||||
**Unprotect** the default branch.
|
||||
|
||||
1. Force-push to GitLab:
|
||||
|
||||
```shell
|
||||
git push --force
|
||||
```
|
||||
|
||||
1. Track the files you want with LFS:
|
||||
|
||||
```shell
|
||||
# Change into the /tmp directory
|
||||
cd /tmp
|
||||
|
||||
# Clone the repo
|
||||
git clone git@gitlab.com:gitlab-tests/test-git-lfs-repo-migration.git
|
||||
|
||||
# Change into the upstream repo directory:
|
||||
cd test-git-lfs-repo-migration
|
||||
|
||||
# You may need to reset your local copy with upstream's `main` after force-pushing from the mirror:
|
||||
git reset --hard origin/main
|
||||
|
||||
# Track the files with LFS:
|
||||
git lfs track "*.gif" "*.png" "*.jpg" "*.psd" "*.mp4" "img/"
|
||||
|
||||
# Push up changes to .gitattributes
|
||||
git add .gitattributes && git commit -m 'Track .gif,.png,.jpg,.psd,.mp4 and img/' && git push
|
||||
```
|
||||
|
||||
Now all existing the files you converted, as well as the new
|
||||
ones you add, are properly tracked with LFS.
|
||||
|
||||
1. [Re-protect the default branch](../../../user/project/protected_branches.md):
|
||||
|
||||
1. Go to your project's **Settings > Repository** and
|
||||
expand **Protected branches**.
|
||||
1. Select the default branch from the **Branch** dropdown list,
|
||||
and set up the
|
||||
**Allowed to push and merge** and **Allowed to merge** rules.
|
||||
1. Select **Protect**.
|
||||
|
||||
<!-- ## Troubleshooting
|
||||
|
||||
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
|
||||
one might have when setting this up, or when something is changed, or on upgrading, it's
|
||||
important to describe those, too. Think of things that may go wrong and include them here.
|
||||
This is important to minimize requests for support, and to avoid doc comments with
|
||||
questions that you know someone might ask.
|
||||
|
||||
Each scenario can be a third-level heading, for example `### Getting error message X`.
|
||||
If you have none to add when creating a doc, leave this section in place
|
||||
but commented out to help encourage others to add to it in the future. -->
|
||||
|
||||
## References
|
||||
|
||||
- [Getting Started with Git LFS](https://about.gitlab.com/blog/2017/01/30/getting-started-with-git-lfs-tutorial/)
|
||||
- [GitLab Git LFS user documentation](index.md)
|
||||
- [GitLab Git LFS administrator documentation](../../../administration/lfs/index.md)
|
||||
- Alternative method to [migrate an existing repository to Git LFS](https://github.com/git-lfs/git-lfs/wiki/Tutorial#migrating-existing-repository-data-to-lfs)
|
||||
|
||||
<!--
|
||||
Test project:
|
||||
https://gitlab.com/gitlab-tests/test-git-lfs-repo-migration
|
||||
-->
|
||||
<!-- This redirect file can be deleted after 2024-06-28. -->
|
||||
<!-- Redirects that point to other docs in the same project expire in three months. -->
|
||||
<!-- Redirects that point to docs in a different project or site (for example, link is not relative and starts with `https:`) expire in one year. -->
|
||||
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html -->
|
||||
|
|
|
|||
|
|
@ -12,17 +12,15 @@ because of:
|
|||
- The large amount of history that must be downloaded.
|
||||
- The large amount of disk space they require.
|
||||
|
||||
[Partial clone](https://github.com/git/git/blob/master/Documentation/technical/partial-clone.txt)
|
||||
is a performance optimization that "allows Git to function without having a
|
||||
[Partial clone](https://git-scm.com/docs/partial-clone)
|
||||
is a performance optimization that allows Git to function without having a
|
||||
complete copy of the repository. The goal of this work is to allow Git better
|
||||
handle extremely large repositories."
|
||||
handle extremely large repositories.
|
||||
|
||||
Git 2.22.0 or later is required.
|
||||
|
||||
## Filter by file size
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitaly/-/issues/2553) in GitLab 12.10.
|
||||
|
||||
Storing large binary files in Git is usually discouraged, because every large
|
||||
file added is downloaded by everyone who clones or fetches changes
|
||||
thereafter. These downloads are slow and problematic, especially when working from a slow
|
||||
|
|
@ -68,8 +66,6 @@ When changing branches, Git may download more missing files.
|
|||
|
||||
## Filter by object type
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitaly/-/issues/2553) in GitLab 12.10.
|
||||
|
||||
For repositories with millions of files and a long history, you can exclude all files and use
|
||||
[`git sparse-checkout`](https://git-scm.com/docs/git-sparse-checkout) to reduce the size of
|
||||
your working copy.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ description: "In Git, commits with problems can be undone, reset, or completely
|
|||
|
||||
# Roll back commits
|
||||
|
||||
In Git, if you make a mistake, you can undo or roll back your changes.
|
||||
For more details, see [Undo options](undo.md).
|
||||
In Git, you can undo or roll back your changes. For more details, see [Undo options](undo.md).
|
||||
|
||||
## Undo commits by removing them
|
||||
|
||||
|
|
|
|||
|
|
@ -8189,6 +8189,16 @@ msgstr ""
|
|||
msgid "Billings|Your account has been validated"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|%d user has been successfully assigned a seat."
|
||||
msgid_plural "Billing|%d users have been successfully assigned a seat."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "Billing|%d user has been successfully unassigned a seat."
|
||||
msgid_plural "Billing|%d users have been successfully unassigned a seat."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "Billing|%{plan} Plan"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -8272,6 +8282,9 @@ msgstr ""
|
|||
msgid "Billing|Error un-assigning GitLab Duo Pro add-on"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Error unassigning GitLab Duo Pro add-on"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Explore paid plans"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -8295,6 +8308,9 @@ msgstr ""
|
|||
msgid "Billing|No users to display."
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Not enough seats"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Private"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -8310,12 +8326,21 @@ msgstr ""
|
|||
msgid "Billing|Remove user %{username} from your subscription"
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Something went wrong when assigning the add-on for the selected members. If the problem persists, please %{supportLinkStart}contact support%{supportLinkEnd}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Something went wrong when assigning the add-on to this member. If the problem persists, please %{supportLinkStart}contact support%{supportLinkEnd}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Something went wrong when un-assigning the add-on to this member. If the problem persists, please %{supportLinkStart}contact support%{supportLinkEnd}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|Something went wrong when unassigning the add-on to the selected members. If the problem persists, please %{supportLinkStart}contact support%{supportLinkEnd}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|There are not enough seats to assign the GitLab Duo Pro add-on to all selected members. To purchase more seats for your subscription, please %{salesLinkStart}contact sales%{salesLinkEnd}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Billing|This action will assign a GitLab Duo Pro seat to 1 user"
|
||||
msgid_plural "Billing|This action will assign a GitLab Duo Pro seat to %d users"
|
||||
msgstr[0] ""
|
||||
|
|
@ -46143,6 +46168,12 @@ msgstr ""
|
|||
msgid "SecurityOrchestration|You must select one or more projects to which this policy should apply."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|You've reached the maximum limit of %{max} %{type} policies allowed. Policies are disabled when added."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|You've reached the maximum limit of %{max} %{type} policies allowed. To save this policy, set enabled: false."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|a license scanner found license violations"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -52365,15 +52396,15 @@ msgstr ""
|
|||
msgid "This setting is allowed for forked projects only"
|
||||
msgstr ""
|
||||
|
||||
msgid "This subscription is for"
|
||||
msgstr ""
|
||||
|
||||
msgid "This suggestion already matches its content."
|
||||
msgstr ""
|
||||
|
||||
msgid "This title already exists."
|
||||
msgstr ""
|
||||
|
||||
msgid "This trial is for"
|
||||
msgstr ""
|
||||
|
||||
msgid "This user cannot be unlocked manually from GitLab"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -1052,30 +1052,35 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions, feature_category: :system_
|
|||
end
|
||||
|
||||
context 'when the user does not have an email configured' do
|
||||
let(:user) { create(:omniauth_user, extern_uid: 'my-uid', provider: 'saml', email: 'temp-email-for-oauth-user@gitlab.localhost') }
|
||||
let_it_be(:username) { generate(:username) }
|
||||
let(:user) { create(:omniauth_user, extern_uid: 'my-uid', provider: 'saml', email: "temp-email-for-oauth-#{username}@gitlab.localhost") }
|
||||
|
||||
before do
|
||||
stub_feature_flags(edit_user_profile_vue: false)
|
||||
stub_omniauth_saml_config(enabled: true, auto_link_saml_user: true, allow_single_sign_on: ['saml'], providers: [mock_saml_config])
|
||||
end
|
||||
|
||||
it 'asks the user to accept the terms before setting an email',
|
||||
quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/388049', type: :flaky } do
|
||||
expect(authentication_metrics)
|
||||
.to increment(:user_authenticated_counter)
|
||||
it 'asks the user to accept the terms before setting an email' do
|
||||
expect(authentication_metrics)
|
||||
.to increment(:user_authenticated_counter)
|
||||
|
||||
gitlab_sign_in_via('saml', user, 'my-uid')
|
||||
gitlab_sign_in_via('saml', user, 'my-uid')
|
||||
|
||||
expect_to_be_on_terms_page
|
||||
click_button 'Accept terms'
|
||||
expect_to_be_on_terms_page
|
||||
click_button 'Accept terms'
|
||||
|
||||
expect(page).to have_current_path(user_settings_profile_path, ignore_query: true)
|
||||
expect(page).to have_current_path(user_settings_profile_path, ignore_query: true)
|
||||
|
||||
fill_in 'Email', with: 'hello@world.com'
|
||||
# Wait until the form has been initialized
|
||||
has_testid?('form-ready')
|
||||
|
||||
click_button 'Update profile settings'
|
||||
fill_in 'Email', with: 'hello@world.com'
|
||||
|
||||
expect(page).to have_content('Profile was successfully updated')
|
||||
end
|
||||
click_button 'Update profile settings'
|
||||
|
||||
expect(page).to have_content('Profile was successfully updated')
|
||||
expect(user.reload).to have_attributes({ unconfirmed_email: 'hello@world.com' })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,13 @@ RSpec.describe UserDetail, feature_category: :system_access do
|
|||
context 'for onboarding_status json schema' do
|
||||
let(:step_url) { '_some_string_' }
|
||||
let(:email_opt_in) { true }
|
||||
let(:registration_type) { 'free' }
|
||||
let(:onboarding_status) do
|
||||
{
|
||||
step_url: step_url,
|
||||
email_opt_in: email_opt_in
|
||||
email_opt_in: email_opt_in,
|
||||
initial_registration_type: registration_type,
|
||||
registration_type: registration_type
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -55,6 +58,38 @@ RSpec.describe UserDetail, feature_category: :system_access do
|
|||
end
|
||||
end
|
||||
|
||||
context 'for initial_registration_type' do
|
||||
let(:onboarding_status) do
|
||||
{
|
||||
initial_registration_type: registration_type
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to allow_value(onboarding_status).for(:onboarding_status) }
|
||||
|
||||
context "when 'initial_registration_type' is invalid" do
|
||||
let(:registration_type) { [] }
|
||||
|
||||
it { is_expected.not_to allow_value(onboarding_status).for(:onboarding_status) }
|
||||
end
|
||||
end
|
||||
|
||||
context 'for registration_type' do
|
||||
let(:onboarding_status) do
|
||||
{
|
||||
registration_type: registration_type
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to allow_value(onboarding_status).for(:onboarding_status) }
|
||||
|
||||
context "when 'registration_type' is invalid" do
|
||||
let(:registration_type) { [] }
|
||||
|
||||
it { is_expected.not_to allow_value(onboarding_status).for(:onboarding_status) }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when there is no data' do
|
||||
let(:onboarding_status) { {} }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue