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
Léo-Paul Géneau
gitlab-ce
Commits
cc2e849a
Commit
cc2e849a
authored
Mar 28, 2019
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a fixed git abbrev parameter when we fetch a git revision
parent
04496085
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
changelogs/unreleased/10735-geo-gitlab-revision-can-return-not-consistent-results.yml
...geo-gitlab-revision-can-return-not-consistent-results.yml
+5
-0
lib/gitlab.rb
lib/gitlab.rb
+1
-1
spec/lib/gitlab_spec.rb
spec/lib/gitlab_spec.rb
+1
-1
No files found.
changelogs/unreleased/10735-geo-gitlab-revision-can-return-not-consistent-results.yml
0 → 100644
View file @
cc2e849a
---
title
:
Use a fixed git abbrev parameter when we fetch a git revision
merge_request
:
26707
author
:
type
:
fixed
lib/gitlab.rb
View file @
cc2e849a
...
@@ -24,7 +24,7 @@ module Gitlab
...
@@ -24,7 +24,7 @@ module Gitlab
if
File
.
exist?
(
root
.
join
(
"REVISION"
))
if
File
.
exist?
(
root
.
join
(
"REVISION"
))
File
.
read
(
root
.
join
(
"REVISION"
)).
strip
.
freeze
File
.
read
(
root
.
join
(
"REVISION"
)).
strip
.
freeze
else
else
result
=
Gitlab
::
Popen
.
popen_with_detail
(
%W[
#{
config
.
git
.
bin_path
}
log --pretty=format:%h -n 1]
)
result
=
Gitlab
::
Popen
.
popen_with_detail
(
%W[
#{
config
.
git
.
bin_path
}
log --pretty=format:%h -
-abbrev=11 -
n 1]
)
if
result
.
status
.
success?
if
result
.
status
.
success?
result
.
stdout
.
chomp
.
freeze
result
.
stdout
.
chomp
.
freeze
...
...
spec/lib/gitlab_spec.rb
View file @
cc2e849a
...
@@ -10,7 +10,7 @@ describe Gitlab do
...
@@ -10,7 +10,7 @@ describe Gitlab do
end
end
describe
'.revision'
do
describe
'.revision'
do
let
(
:cmd
)
{
%W[
#{
described_class
.
config
.
git
.
bin_path
}
log --pretty=format:%h -n 1]
}
let
(
:cmd
)
{
%W[
#{
described_class
.
config
.
git
.
bin_path
}
log --pretty=format:%h -
-abbrev=11 -
n 1]
}
around
do
|
example
|
around
do
|
example
|
described_class
.
instance_variable_set
(
:@_revision
,
nil
)
described_class
.
instance_variable_set
(
:@_revision
,
nil
)
...
...
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