git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git GUI Guesses Incorrect Language

From
SVSunjay Varma <varma.sunjay@gmail.com>
Date
Jul 9, 2016, 04:57 UTC
Message-ID
<CAJaQC31Su7NKd46cD81HE2OvC=O09aon12k8HFV29def4BAYfw@mail.gmail.com>
Here is a screenshot of what I am talking about: http://i.imgur.com/9ZRkeYF.png
This is the `git gui` program.

Just before the first line of my code, it says "C++ source, ASCII text". That file is a JavaScript/ES6 file. The ".jsx" file extension signifies that it may also contain Facebook's special JSX syntax (HTML-like syntax in JavaScript).

Interestingly enough, my other files (http://i.imgur.com/L0qCRO4.png) seem to get guessed fine. This file is only shown as "ASCII text". That one file just seems to be a false positive.

Here's the file that gets incorrectly reported as C++: https://github.com/sunjay/snake/blob/33bb6135b7bc4f6a958c3fdf51162f86e4cdf508/src/models/pathPlan.jsx

Here's the file that is only reported as "ASCII text": https://github.com/sunjay/snake/blob/33bb6135b7bc4f6a958c3fdf51162f86e4cdf508/src/services/ai.jsx

Both files were unstaged when this occurred. There is no line at the top for any files that are just modified.

Not a huge deal at all, but still a bug as this code is not C++ at all.

Cheers, Sunjay

Next: Johannes Sixt
Message 1 of 3 in “Git GUI Guesses Incorrect Language”
  1. Sunjay VarmaJul 9, 2016
  2. Johannes SixtJul 9, 2016
  3. Sunjay VarmaJul 9, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.