diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-12 20:28:21 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-12 20:28:21 +0000 |
commit | b956605f9e5f95ded853d3458f0f132dbb5b892a (patch) | |
tree | dd1596c99ab5766e8749f45acb1e5a0d22e1a4d1 /spec/models/commit_spec.rb | |
parent | 66dd61ef0f1f98f860bdef5aa2cdb1c6f2e1f83f (diff) | |
parent | b02c21df5cc0dcc795f71f8c11d05d61dc2ad897 (diff) | |
download | gitlab-ce-4e80223336a3a4c564683705cc2bee7390406bc1.tar.gz |
Merge branch 'ambiguous-sha' into 'master'fondev
Fix ambiguous sha problem with mentioned commit
Before: write in database only 6 chars of commit sha. This cause to `Ambiguous SHA1 prefix` exception.
- [x] write full commit sha in db.
- [x] Standardise usage of sha truncation: 8 characters everywhere.
- [x] prevent exception when ambiguous sha requested in markdown
Fixes #1644
See merge request !1171
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r-- | spec/models/commit_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 6f201adc4e8..a6ec44da4be 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -75,7 +75,7 @@ eos it_behaves_like 'a mentionable' do let(:subject) { commit } let(:mauthor) { create :user, email: commit.author_email } - let(:backref_text) { "commit #{subject.sha[0..5]}" } + let(:backref_text) { "commit #{subject.id}" } let(:set_mentionable_text) { ->(txt){ subject.stub(safe_message: txt) } } # Include the subject in the repository stub. |