Commit Graph

570 Commits

Author SHA1 Message Date
Grzegorz Bizon eb421c88ee Merge branch 'fix-squash-with-renamed-files' into 'master'
Fix squash with renamed files

Closes gitlab-ee#4975

See merge request gitlab-org/gitlab-ce!17216
2018-02-22 11:35:34 +00:00
Douwe Maan e503efa320 Merge branch 'zj-branch-contains-git-message' into 'master'
Allow branchnames to be named the same as the commit it points to

See merge request gitlab-org/gitlab-ce!17231
2018-02-22 11:34:03 +00:00
Grzegorz Bizon 15196f9269 Merge branch 'ce-gitaly-squash-in-progress' into 'master'
[CE] Incorporate Gitaly's RepositoryService.IsSquashInProgress RPC

See merge request gitlab-org/gitlab-ce!17002
2018-02-22 08:03:15 +00:00
Alejandro Rodríguez acc0e25de7 Incorporate Gitaly's RepositoryService.IsSquashInProgress RPC 2018-02-21 17:35:31 -03:00
Zeger-Jan van de Weg e70fe78281
Handle branch and tag names which are commit ids
Adds a test where a branch name is also a valid commit id. Git, the
binary should create an error message which is difficult to parse and
leading to errors later, as seen in: gitlab-org/gitlab-ce#43222

To catch these cases in the future,
gitlab-test@1942eed5cc108b19c7405106e81fa96125d0be22 was created. Which
a branch name matching the commit
2018-02-21 19:08:26 +01:00
Sean McGivern 01f5035bfe Fix squash with renamed files
We need to ignore the names for renamed files when configuring with sparse
checkout.
2018-02-19 15:11:10 +00:00
Sean McGivern 0b032daa11 Merge branch '32564-fix-double-system-closing-notes' into 'master'
Resolve "Double closing system  notes when closing issue with Merge Request"

Closes #32546 and #32564

See merge request gitlab-org/gitlab-ce!17035
2018-02-19 11:50:28 +00:00
Sean McGivern 23dd313d76 Convert Gitaly commit parent IDs to array as early as possible
The tracking issue if this causes problems is
https://gitlab.com/gitlab-org/gitaly/issues/1028
2018-02-19 11:21:23 +00:00
Stan Hu 8d32dfef9b Fix squash rebase not working when diff contained encoded data
When the applied diff contains UTF-8 or some other encoded data, the diff
returned back from the git process may be in ASCII-8BIT format. Writing this
data to stdin may fail if the data because stdin expects this data to be in
UTF-8. By switching the output to binmode, we ensure that the diff will
always be written as-is.

Closes gitlab-org/gitlab-ee#4960
2018-02-18 21:48:49 -08:00
Micaël Bergeron af5cd10e00 applying feedback
#	modified:   lib/gitlab/git/commit.rb
2018-02-16 13:51:19 -05:00
Micaël Bergeron f949255461 fix specs 2018-02-16 13:51:19 -05:00
Ahmad Sherif 8cdb3477b0 Remove allow_n_plus_1 from Git::Repository#branches_filter 2018-02-08 19:20:46 +01:00
Ahmad Sherif dabc703a29 Migrate Git::Blob.batch to Gitaly
Closes gitaly#985
2018-02-08 00:26:45 +01:00
Francisco Javier López d40912bb49 Removing gitaly flags 2018-02-07 16:33:12 +00:00
Sean McGivern 683984f2e3 Merge branch 'zj-refs-hash' into 'master'
Don't use rugged in Repository#refs_hash

Closes gitaly#880

See merge request gitlab-org/gitlab-ce!16827
2018-02-07 15:42:55 +00:00
Zeger-Jan van de Weg 73e78c4e15
Don't use rugged in Repository#refs_hash
The refs hash is used to determine what branches and tags have a commit
as head in the network graph. The previous implementation depended on
Rugged#references. The problem with this implementation was that it
depended on rugged, but also that it iterated over all references and
thus loading more data than needed if for example the project uses CI/CD
environments, Pipelines, or Merge Requests.

Given only refs are checked the network cares about the GraphHelper#refs
method has no need to reject those, simplifying the method.

Closes gitlab-org/gitaly#880
2018-02-07 15:07:03 +01:00
Stan Hu bc59a5d0a5 Merge branch 'dm-git-hook-popen' into 'master'
Only set cwd on the newly spawned process, instead of the current one

See merge request gitlab-org/gitlab-ce!16958
2018-02-06 19:17:22 +00:00
Douwe Maan 81b5ce1152 Only set cwd on the newly spawned process, instead of the current one 2018-02-06 12:19:48 -06:00
Douwe Maan 7095c2bf40 Merge branch '42730-close-rugged-repository' into 'master'
Resolve "ProjectCacheWorker leaks file descriptors"

Closes #42730

See merge request gitlab-org/gitlab-ce!16930
2018-02-06 17:49:00 +00:00
Douwe Maan a480ee184b Merge branch 'zj/gitlab-ce-zj-wiki-page-versions' 2018-02-06 11:41:09 -06:00
Robert Speicher 245d937514 Merge branch 'gitaly-lfs-client-prep' into 'master'
Refactor Gitlab::Git code related to LFS changes for Gitaly migration

Closes gitaly#980

See merge request gitlab-org/gitlab-ce!16835
2018-02-06 17:35:08 +00:00
Bastian Blank 285d5d526b Close low level rugged repository in project cache worker
Signed-off-by: Bastian Blank <waldi@debian.org>
2018-02-06 16:36:35 +00:00
Sean McGivern f81306e76f Merge branch 'jej/upload-file-tracks-lfs' into 'master'
File upload UI obeys LFS filter

Closes #29876

See merge request gitlab-org/gitlab-ce!16412
2018-02-06 16:24:54 +00:00
Douwe Maan 5db5a9cbd1 Merge branch 'master' into 'zj-wiki-page-versions'
# Conflicts:
#   Gemfile
#   Gemfile.lock
2018-02-06 16:08:06 +00:00
James Edwards-Jones d2a77094ae File upload UI obeys LFS filters
Uses Lfs::FileModificationHandler to coordinate LFS detection, creation of LfsObject, etc

Caveats:
 1. This isn't used by the multi-file editor / Web IDE
 2. This isn't used on rename. We'd need to be able to download LFS files
    and add them to the commit if they no longer match so not as simple.
 3. We only check the root .gitattributes file, so this should be improved
    to correctly check for nested .gitattributes files in subfolders.
2018-02-06 15:26:25 +00:00
Francisco Javier López 27c08a1689 Allow moving wiki pages from the UI 2018-02-05 17:17:21 +00:00
Rémy Coutable f5990e444a Merge branch 'gitaly-user-squash' into 'master'
Incorporate OperationService.UserSquash Gitaly RPC

Closes gitaly#991

See merge request gitlab-org/gitlab-ce!16899
2018-02-05 10:32:20 +00:00
Douwe Maan 295ff65d62 Merge branch 'zj-ref-contains' into 'master'
Client changes for Tag,BranchNamesContainingCommit

See merge request gitlab-org/gitlab-ce!16789
2018-02-04 11:31:49 +00:00
Alejandro Rodríguez e60bf2f256 Incorporate OperationService.UserSquash Gitaly RPC 2018-02-02 19:02:40 -03:00
Alejandro Rodríguez 98affa75ed Refactor Gitlab::Git code related to LFS changes for Gitaly migration
We stop relying on Gitlab::Git::Env for the RevList class, and use
Gitlab::Git::Repository#run_git methods inteaad. The refactor also fixes
another issue, since we now top using "path_to_repo" (which is a
Repository model method).
2018-02-02 16:27:01 -03:00
Douwe Maan 26debb120e Merge branch 'master' into 'zj-ref-contains'
# Conflicts:
#   lib/gitlab/git/repository.rb
2018-02-01 20:22:04 +00:00
Alejandro Rodríguez 658749ddd3 Fix an issue where sparse checkout wasn't configured correctly
This was affecting the performance of `Gitlab::Git::Repository#squash`.
2018-02-01 17:07:40 -03:00
Robert Speicher 2793e3e1cc Merge branch 'gitaly-970-repo-write-config' into 'master'
Migrate Gitlab::Git::Repository#write_config to Gitaly

Closes gitaly#970

See merge request gitlab-org/gitlab-ce!16730
2018-02-01 19:46:32 +00:00
Zeger-Jan van de Weg fd46d6ceb8
Remove intermediate methods on Branch and Tag classes 2018-02-01 13:00:38 +01:00
Zeger-Jan van de Weg 0a47d1924d
Client changes for Tag,BranchNamesContainingCommit
As part of gitlab-org/gitaly#884, this commit contains the client
implementation for both TagNamesContaintingCommit and
BranchNamesContainingCommit. The interface in the Repository model stays
the same, but the implementation on the serverside, e.g. Gitaly, uses
`for-each-ref`, as opposed to `branch` or `tag` which both aren't
plumbing command. The result stays the same.

On the serverside, we have the opportunity to limit the number of names
to return. However, this is not supported on the front end yet. My
proposal to use this ability: gitlab-org/gitlab-ce#42581. For now, this
ability is not used as that would change more behaviours on a feature
flag which might lead to unexpected changes on page refresh for example.
2018-02-01 13:00:33 +01:00
Rémy Coutable 76b9f1a4c5 Merge branch '42497-rubocop-style-regexpliteral' into 'master'
Enable Style/RegexpLiteral cop

Closes #42497

See merge request gitlab-org/gitlab-ce!16752
2018-02-01 09:11:09 +00:00
Douwe Maan 283c0a9d28 Merge branch 'repository-log-disable-walk' into 'master'
Remove Rugged::Walk implementation of #log

See merge request gitlab-org/gitlab-ce!16798
2018-01-31 21:54:02 +00:00
Takuya Noguchi 2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
Kim "BKC" Carlbäcker 28bbb4cb47 Migrate Gitlab::Git::Repository#write_config to Gitaly
- Add tests for Repository#write_config
2018-01-31 15:02:31 +01:00
Sean McGivern a0fc0fcc53 Merge branch 'rugged-reference-cache-rescue' into 'master'
Stop rescuing Rugged::Reference in Repository cache

See merge request gitlab-org/gitlab-ce!16770
2018-01-31 14:00:37 +00:00
Grzegorz Bizon dacd9dbef4 Merge branch 'fix/move-can-be-merged-to-lib-git' into 'master'
Move Repository#can_be_merged? to Gitlab::Git::Repository

Closes #42544

See merge request gitlab-org/gitlab-ce!16771
2018-01-31 11:02:09 +00:00
Jacob Vosmaer afe665d9c0 Remove Rugged::Walk implementation of #log 2018-01-31 11:56:36 +01:00
Ahmad Sherif 1ebb781f6a Migrate Git::Repository#delete_refs to Gitaly
Closes gitaly#967
2018-01-30 23:48:51 +01:00
Robert Speicher 95b4f7ea37 Merge branch 'feature/migrate-wiki-page-formatted-data-to-gitaly' into 'master'
Migrate fetching wiki page formatted content to Gitaly

Closes gitaly#958

See merge request gitlab-org/gitlab-ce!16716
2018-01-30 20:47:23 +00:00
Douwe Maan 40e128730f Merge branch 'gitaly-784-repo-write-ref' into 'master'
Migrate Git::Repository#write_ref to Gitaly

Closes gitaly#784

See merge request gitlab-org/gitlab-ce!16513
2018-01-30 18:48:56 +00:00
Ahmad Sherif 11191f938c Move Repository#can_be_merged? to Gitlab::Git::Repository
Fixes #42544
2018-01-30 19:05:34 +01:00
Jacob Vosmaer a6dbb85e97 Remove Rugged exception in cache rescue 2018-01-30 17:51:56 +01:00
Jacob Vosmaer (GitLab) 5c2fe2d3d7 Decouple more of Repository from Rugged 2018-01-30 16:21:55 +00:00
Ahmad Sherif fa9d47f221 Migrate fetching wiki page formatted content to Gitaly
Closes gitaly#958
2018-01-30 17:19:39 +01:00
Kim "BKC" Carlbäcker 10fb904d63 Migrate Git::Repository#write_ref to Gitaly 2018-01-30 12:22:31 +01:00