News for hackers. Stuff that matters.
Re:GitHub code search beta signup by canyonero on Wednesday November 09, 2022 @04:11PM (#33537899)
One feature for code search that I've wanted for some time that could unlock some really interesting results would be to allow search to reach into the git file history.

I've found myself sometimes thinking that something existed in a particular codebase and I go to look for only to discover that I'm unable find it. Then, I realize that the code I was looking for has been removed. I can only find it by browsing back into the history figuring out the events that led to the deletion or change. Being able to search the history would be killer IMO.

Re:GitHub code search beta signup by LifeIsBio on Wednesday November 09, 2022 @04:18PM (#33537991)
I’ve run into this exact situation multiple times. Searching the whole history would be revolutionary.
Re:GitHub code search beta signup by slimsag on Wednesday November 09, 2022 @04:27PM (#33538096)
FWIW you can do this with Sourcegraph today, searching over both diffs (code changes)[0] and commit messages[1]:

[0] https://sourcegraph.com/search?q=context:global+repo:%5Egith...

[1] https://sourcegraph.com/search?q=context:global+repo:%5Egith...

(I work there, just commenting on my own though. we're all pretty happy to have competition, more awareness of code search, etc.)

Re:GitHub code search beta signup by durazabu on Wednesday November 09, 2022 @04:22PM (#33538032)
Are you familiar with git pickaxe?

For example: git log -pS 'deletedvar'

Re:GitHub code search beta signup by disqard on Wednesday November 09, 2022 @04:49PM (#33538406)
Thank you for sharing that! TIL.
Re:GitHub code search beta signup by sdesol on Wednesday November 09, 2022 @04:24PM (#33538063)
This is something that I'm working on and I believe a couple of others as well. My solution won't be available until early next year though, as indexing public repos at scale is far from trivial and I'm expecting this will consume over 40TB of fast storage to be performant.