Fix issue when switching branch when BLOB is shown
Created by: Deradon
This fix one issue of #3666 (closed).
When browsing a project, and showing a file, if you try to switch to another branch this result in an error.
This commit should fix it.
Merge request reports
Activity
Created by: Deradon
Ah, it only fixes it, if you show the file via HTML request, not ajax. (Aka calling URL directly, w/o browsing around)
Will have a look how to fix it ...
By Administrator on 2013-04-22T22:43:32 (imported from GitLab project)
By Administrator on 2013-04-22T22:43:32 (imported from GitLab)
Created by: coveralls
Coverage decreased (-0.1%) when pulling 27b4d3a55ba88e7ceb18166230cd6dd0a06fa6b7 on Deradon:fix-blob-switching into 5ac5f586 on gitlabhq:master.
By Administrator on 2013-04-22T23:06:00 (imported from GitLab project)
By Administrator on 2013-04-22T23:06:00 (imported from GitLab)
Created by: Andrepuel
It is working like a charm, now!
Do you know what the
follow: true
does in thedef commits
oflib/gitlab/git/repository.rb
?Because maybe you should add the following patch to your branch:
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index ddead51..a0ab682 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -68,8 +68,8 @@ module Gitlab end def commits(ref, path = nil, limit = nil, offset = nil) if path.present? - repo.log(ref, path, max_count: limit, skip: offset, follow: true) + repo.log(ref, path, max_count: limit, skip: offset) elsif limit && offset repo.commits(ref, limit.to_i, offset.to_i) else
By Administrator on 2013-04-23T01:23:09 (imported from GitLab project)
By Administrator on 2013-04-23T01:23:09 (imported from GitLab)