git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git GUI Guesses Incorrect Language
@ 2016-07-09  4:57 Sunjay Varma
  2016-07-09  6:57 ` Johannes Sixt
  0 siblings, 1 reply; 3+ messages in thread
From: Sunjay Varma @ 2016-07-09  4:57 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git GUI Guesses Incorrect Language
  2016-07-09  4:57 Git GUI Guesses Incorrect Language Sunjay Varma
@ 2016-07-09  6:57 ` Johannes Sixt
  2016-07-09  6:59   ` Sunjay Varma
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2016-07-09  6:57 UTC (permalink / raw)
  To: Sunjay Varma; +Cc: git

Am 09.07.2016 um 06:57 schrieb Sunjay Varma:
> 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).

Git-gui just delegates to the 'file' command. What does

   file src/models/pathPlan.jsx src/services/ai.jsx

report? If that guesses wrongly in the same way, then the authors of the 
file command are the right address for your complaint.

-- Hannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git GUI Guesses Incorrect Language
  2016-07-09  6:57 ` Johannes Sixt
@ 2016-07-09  6:59   ` Sunjay Varma
  0 siblings, 0 replies; 3+ messages in thread
From: Sunjay Varma @ 2016-07-09  6:59 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

Seems like a file command issue then.

Here's the 'file' command output:

  $ file src/models/pathPlan.jsx src/services/ai.jsx
  src/models/pathPlan.jsx: C++ source, ASCII text
  src/services/ai.jsx:     ASCII text

Sunjay

On Sat, Jul 9, 2016 at 2:57 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> Am 09.07.2016 um 06:57 schrieb Sunjay Varma:
>>
>> 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).
>
>
> Git-gui just delegates to the 'file' command. What does
>
>   file src/models/pathPlan.jsx src/services/ai.jsx
>
> report? If that guesses wrongly in the same way, then the authors of the
> file command are the right address for your complaint.
>
> -- Hannes
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-09  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-09  4:57 Git GUI Guesses Incorrect Language Sunjay Varma
2016-07-09  6:57 ` Johannes Sixt
2016-07-09  6:59   ` Sunjay Varma

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).