Live data from Hacker News

A Whole New Code Search

github.com

41–50 of 113 posts

Re: A Whole New Code Search

#41
Still feel this is missing the preciseness of former google code search. It doesn't respect many of the symbols common in programming languages.

Here is an example. The query "format(args" will match "func formatArgs(args", but not "func format(args".

https://github.com/search?q=format%28args+repo%3Asimonz05%2F...

Re: A Whole New Code Search

#42
Excellent feature. Thanks for making life a little better for a lot of us.

On a side note, I wonder how long before it'll be used to find security flaws in code (that results in an exploit) - I bet there are hundreds of hard-coded passwords, insecure defaults etc. all over the place.

Re: A Whole New Code Search

#44

I just updated a userscript I created a while back so it works with the new code search: https://github.com/skratchdot/github-code-search.user.js/ It's just a shortcut for searching the current repository you are viewing (by adding a search box next to the tag count).

Your script would be awesome, something I don't understand why Github doesn't provide natively. Unfortunately it isn't working for me that well.

Go to one of my org's repos: http://github.com/railsforcharity/spokenvote

and search this string (which is in our seeds.rb): users I not only don't get the right result, I don't get any text in the search results area of the page, not even a nothing found message. Same thing if I do the search on my personal fork.

Re: A Whole New Code Search

#47

Earlier quoted context omitted.

Have you considered renaming your fork? Like xyz-old? One of the things that annoys (and sometimes infuriates) me about github is identifying the fork I want to be using. A million old blog posts point to the wrong place. If that repo were replaced with a new blank repo saying "moved to here" it'd be a big help.

I did change the readme to point to the new mainline development. I still think there might be some utility in having the code as I left it around, so I didn't delete the repo.

Deleting your repo and recreating it as a fork of the new upstream may be a good idea, although it does break the links to all of the other repositories forked from yours. It really would be nice if Github handled this case better.
Post reply on HN