github/linguist — pull request #728 by charliesome (2013-10-16 16:25:26+00:00)
Title: Ensure no two languages have the same primary extension

Objective-C and MUMPS both use the same primary file extension - .m.

This causes problems on gist where entering a filename ending in .m will pick Matlab. On the latest version of Linguist, it'll prefer MUMPS instead of Objective-C.

This pull request ensures that no two languages can share the same primary file extension and changes the `find_by_filename` logic to prefer a language with a matching primary file extension.

It also fixes the Objective-C/MUMPS clash by changing MUMPS' primary file extension to .mumps and adding .m as an alternate file extension. This means that the filename input on Gist will correctly pick Objective-C, while making sure that any MUMPS code on GitHub is still correctly detected as MUMPS.

cc @tnm @vmg