livegrep / livegrep

Interactively grep source code. Source for http://livegrep.com/
Other
2.02k stars 180 forks source link

Remove sha shortening in URLs #394

Open qaisjp opened 2 months ago

qaisjp commented 2 months ago

Problem

Links to external repos (from the search results page) link to files with the commit sha trimmed to 8 characters. 8 characters is not enough in repos with a lot of commits.

Suggested solution

Remove sha shortening altogether.

Additional context

Looks like the shortener is called here: https://github.com/livegrep/livegrep/blob/cd8c63831c949291ccfba01cb445cbf427f03240/web/src/codesearch/codesearch_ui.js#L108-L108

With the actual shortening happening here (it pulls out the first 8 characters of a sha-like string): https://github.com/livegrep/livegrep/blob/cd8c63831c949291ccfba01cb445cbf427f03240/web/src/codesearch/codesearch_ui.js#L54

Issue filed on behalf of Stripe.

nelhage commented 2 months ago

This seems reasonable! Do you have time to put up a PR? I'd be happy to review if so.