Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
3ddde75a
Commit
3ddde75a
authored
Mar 08, 2018
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make 'git fsck' mandatory
parent
7734e85b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+2
-16
No files found.
lib/gitlab/git/repository.rb
View file @
3ddde75a
...
@@ -1189,16 +1189,10 @@ module Gitlab
...
@@ -1189,16 +1189,10 @@ module Gitlab
end
end
def
fsck
def
fsck
gitaly_migrate
(
:git_fsck
)
do
|
is_enabled
|
msg
,
status
=
gitaly_repository_client
.
fsck
msg
,
status
=
if
is_enabled
gitaly_fsck
else
shell_fsck
end
raise
GitError
.
new
(
"Could not fsck repository:
#{
msg
}
"
)
unless
status
.
zero?
raise
GitError
.
new
(
"Could not fsck repository:
#{
msg
}
"
)
unless
status
.
zero?
end
end
end
def
create_from_bundle
(
bundle_path
)
def
create_from_bundle
(
bundle_path
)
gitaly_migrate
(
:create_repo_from_bundle
)
do
|
is_enabled
|
gitaly_migrate
(
:create_repo_from_bundle
)
do
|
is_enabled
|
...
@@ -1606,14 +1600,6 @@ module Gitlab
...
@@ -1606,14 +1600,6 @@ module Gitlab
File
.
write
(
File
.
join
(
worktree_info_path
,
'sparse-checkout'
),
files
)
File
.
write
(
File
.
join
(
worktree_info_path
,
'sparse-checkout'
),
files
)
end
end
def
gitaly_fsck
gitaly_repository_client
.
fsck
end
def
shell_fsck
run_git
(
%W[--git-dir=
#{
path
}
fsck]
,
nice:
true
)
end
def
rugged_fetch_source_branch
(
source_repository
,
source_branch
,
local_ref
)
def
rugged_fetch_source_branch
(
source_repository
,
source_branch
,
local_ref
)
with_repo_branch_commit
(
source_repository
,
source_branch
)
do
|
commit
|
with_repo_branch_commit
(
source_repository
,
source_branch
)
do
|
commit
|
if
commit
if
commit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment