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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ffef94f1
Commit
ffef94f1
authored
8 years ago
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make error message appropriate for end users
parent
a93a610b
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/models/repository.rb
app/models/repository.rb
+2
-2
No files found.
app/models/repository.rb
View file @
ffef94f1
...
...
@@ -221,13 +221,13 @@ class Repository
# (and have!) accidentally reset the ref to an earlier state, clobbering
# commits. See also https://github.com/libgit2/libgit2/issues/1534.
command
=
%w[git update-ref --stdin -z]
output
,
status
=
Gitlab
::
Popen
.
popen
(
command
,
path_to_repo
)
do
|
stdin
|
_
,
status
=
Gitlab
::
Popen
.
popen
(
command
,
path_to_repo
)
do
|
stdin
|
stdin
.
write
(
"update
#{
name
}
\x00
#{
newrev
}
\x00
#{
oldrev
}
\x00
"
)
end
return
if
status
.
zero?
raise
CommitError
.
new
(
"
error updating ref
#{
name
}
#{
oldrev
}
->
#{
newrev
}
\n
#{
output
}
"
)
raise
CommitError
.
new
(
"
Could not update branch
#{
name
.
sub
(
'refs/heads/'
,
''
)
}
. Please refresh and try again.
"
)
end
# Makes sure a commit is kept around when Git garbage collection runs.
...
...
This diff is collapsed.
Click to expand it.
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