Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !3592

Closed
Created 12 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

Implemented code search feature

  • Overview 41
  • Commits 2
  • Changes 11

Created by: jacargentina

The feature in action

TypeSearchTerm Type your search term on any project place...

CodeResultsReady Then get your results with links to them!

Loading
Loading

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage decreased (-47.03%) when pulling 5aef194ae911d075963e791e843ee9415b0a37f0 on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-14T17:20:13 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage decreased (-41.72%) when pulling 44a3bbbd90a92ff3398aabdc3e6cfc7e52a43092 on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-14T19:37:35 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage decreased (-37.36%) when pulling a46bb60eca1be62ce20821e27df0ff48550902b5 on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-15T00:52:12 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    Somebody can give me a tip of what is going on with that last travis build failing??

    By Administrator on 2013-04-15T03:00:04 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    GitLab uses patch version of Grit, so that you should fork from https://github.com/gitlabhq/grit.

    By Administrator on 2013-04-15T03:16:13 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage remained the same when pulling d029f559f35a408ce3b7367a580ce0389f45d218 on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-15T13:03:20 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    Still failing? What is the problem now? Something realted with wiki tests i see... but i didn touched anything related with wikis? some advice please?

    By Administrator on 2013-04-15T13:26:03 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    Broken tests by https://github.com/gitlabhq/grit/pull/19. I think that you need to fix grit test before gitlab PR.

    By Administrator on 2013-04-15T14:24:59 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage decreased (-12.24%) when pulling f4107cc3c7d01be8bcf49bc1993ef27caff939fc on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-15T21:27:10 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage decreased (-12.03%) when pulling 0da5c20537f0af38da747b6f263d08bad033a0fd on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-15T22:20:45 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage decreased (-0.0%) when pulling 5a37538860e35bfcaef53ee04845b383dd637903 on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    View Details

    By Administrator on 2013-04-16T03:04:31 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    It seems travis failed on v2.0.0 Any advice?

    By Administrator on 2013-04-16T12:16:19 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage increased (+0.04%) when pulling e5601d5d0e89f4e4e49ce57de0d28aba0d9e84db on jacargentina:code-search into 63b78a39 on gitlabhq:master.

    By Administrator on 2013-04-17T12:29:43 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-0.14%) when pulling 94e3e80de81bedf4049e1d8a5016185d40e6d33e on jacargentina:code-search into 26befdc7 on gitlabhq:master.

    By Administrator on 2013-04-18T00:24:42 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    It is ready now, rebased to last master.

    By Administrator on 2013-04-18T00:49:47 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-0.17%) when pulling 2f5dccaec56147e80b18b3234c6460beb9e3e5b0 on jacargentina:code-search into 44d63b4c on gitlabhq:master.

    By Administrator on 2013-04-20T22:33:58 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    A new rebase to latest master. Please evaluate to include on a next release?

    By Administrator on 2013-04-20T22:46:14 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: akzhan

    +1 for this feature.

    By Administrator on 2013-04-22T18:51:44 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: akzhan

    @jacargentina I need to send and have applied a pull request to the grit gem itself before this one.

    By Administrator on 2013-04-22T18:53:33 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    @akzhan: I dont understand your "I need to send".... There is something i can do for advancing on this? I 've already did MR on grit and on gitlabhq.

    By Administrator on 2013-04-22T18:59:02 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-0.18%) when pulling db31886cfa321c79d9375fa86d711f36a339d6c3 on jacargentina:code-search into 44d63b4c on gitlabhq:master.

    By Administrator on 2013-04-25T00:48:09 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-0.17%) when pulling c503709fbe41facebe7f0be30334d958c13c24f3 on jacargentina:code-search into 75fbdc40 on gitlabhq:master.

    By Administrator on 2013-04-26T01:14:10 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    @akzhan @randx @hiroponz

    I really, really want this feature on gitlab. Any advice on how to help with getting that done?

    Maybe if some of you have a little time to see my code in action, can point me some ideas/details to make it better, etc. I have some spare time to do that, so i can work on this.

    Please?

    Cheers!

    By Administrator on 2013-04-26T01:10:31 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    @jacargentina I think that the gitlab core members don't have much time to review your PR. There are too many issues and PR to review by them. So I think that you need to wait for a while.

    To save thier time, adding detailed description, screenshots and spinach test case about PR are good practices.

    Sorry, my English may be confusing.

    By Administrator on 2013-04-26T03:59:22 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    @hiroponz
    Your english is perfectly fine. Thanks for your advice!

    By Administrator on 2013-04-26T13:12:29 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    @jacargentina

    My past PR that was merged may be helpfut. For example #2260, #2910. #3109.

    BTW, it is very useful that a screenshot can be attached by drag & drop on text field.

    By Administrator on 2013-04-27T04:17:56 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-0.11%) when pulling bb5297137b38f1af4b1d5b7dcd80a5d3eec638a9 on jacargentina:code-search into 75fbdc40 on gitlabhq:master.

    By Administrator on 2013-04-28T19:15:50 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-12.62%) when pulling 2c481fc14e54302f2b4a59b0489a82f3eaae81b7 on jacargentina:code-search into 65b601fe on gitlabhq:master.

    By Administrator on 2013-04-29T12:18:34 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    @jacargentina It looks good, but I think that editing and attaching screenshots to top comment of PR are better. And I have some questions.

    1. What is searched? I suppose the file names and the file contents.
    2. Which branch is searched? I suppose the default branch of the project.
    3. It seems all projects are searched by default. So if there are many projects, it would occur performance problem. Are these right?

    By Administrator on 2013-04-30T14:08:32 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    @hiroponz Sorry, mi first big PR on gitlab, unexperienced on github collaboring best practices.

    1. and 2. The "current" branch. If u are looking at a given tree, it will look there; else it will look on the project default branch. Basically the search goes through git grep and shows a context (by default 3 lines) for each file matching the grep (u can search regular expressions too!)
    2. Only the "current" browsed project is searched so far. I mean, if u try to search for code on the dashboard, it will not do any search. So basically there is not any "global repo code search" performance problem.

    By Administrator on 2013-04-30T14:16:52 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    @jacargentina It sounds great! You can edit the top comment of PR by clicking "Edit" button any time. I think that it looks good if previous comments move to top comment of PR.

    BTW, can you add some spinach test cases? 95b82607 may be of some help.

    By Administrator on 2013-04-30T14:54:04 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: YenZi

    Code search looks good ! But I have some small comment. We have gitlab running in a company context, so I think usage is a bit different to a community way of usage. So, from my perspective, I would like to have issues and wikis searched in the first place. Not so much the code (since I have the repo on my harddrive anyway ;-) ) I am a bit afraid that the code search will slow down the common search, although I am not interested in the code most of the time. Is there a way to explicitly search for code If I want to ? Otherwise only search for issues and wikis ?

    By Administrator on 2013-04-30T15:09:45 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    @hiroponz I've looked at https://github.com/gitlabhq/gitlabhq/commit/95b8260 as you pointed, but i dont understand. Will i need the .feature file with those @javascript marks, or just the .rb file with the spinach tests ? BTW, never did a spinach test, so i think it will take me some time to do it.

    @YenZi May be we can add a setting on the project for enabling code search by default on that specific project? I receive any ideas or code for this!

    Thanks for the feedback!

    By Administrator on 2013-04-30T15:18:59 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: hiroponz

    @jacargentina Both .feature and .rb file need for spinach test. @javascript marks only need if javascript needs when rendering pages.

    Spinach is similar with cucumber. So searching for cucumber may be helpful for you. http://thechangelog.com/spinach-like-cucumber-but-with-more-ruby-less-regex/

    By Administrator on 2013-05-03T01:03:47 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    Somebody interested on this feature can help me with the css styling for the line numbers please?

    captura de pantalla de 2013-05-05 20 31 58

    By Administrator on 2013-05-05T23:34:13 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: dzaporozhets

    @jacargentina Hi! Thank you for submitted this feature. I attached this PR to 5.2 milestone. Hope we will merge it soon. But before I need to review code.

    By Administrator on 2013-05-07T12:57:22 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 3751f0cd 12 years ago
    app/models/project.rb
    409 409 !(forked_project_link.nil? || forked_project_link.forked_from_project.nil?)
    410 410 end
    411 411
    412 def files(query, treeish)
    413 snippets = []
    414 tree = treeish.present? ? treeish : default_branch
    415 if repository && !tree.nil?
    416 greps = repository.repo.grep(query, 3, tree)
    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: dzaporozhets

      please next time move all grit/git logic to gitlab_git gem

      By Administrator on 2013-05-09T08:28:59 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: dzaporozhets

    @jacargentina hey I've merged your feature. Although I made some changes to code base and workflow - hope you like it :)

    By Administrator on 2013-05-09T08:50:03 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    Yes, your changes are very welcome, as i'm not a gitlab expert, i just tried to make it work.

    On the gitlab_git gem, it didn't existed when i first approached this patch, as it was born a week ago or so.

    By Administrator on 2013-05-09T12:02:14 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jacargentina

    @randx I still see ugly (not inline with the line code) rendered line numbers, any idea on why?

    By Administrator on 2013-05-09T13:39:26 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: dzaporozhets

    @jacargentina its only fo development env. Maybe some haml issue

    By Administrator on 2013-05-13T20:09:14 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/jacargentina/code-search

    0 pending comments

Menu

Projects Groups Snippets
Help