> How does github identify language? If I have a C++ include file, > should it end with .hpp rather than .h?
Does git need to know about language? (I mean, beyond the fact that the file is "text" or "binary")
*.h files can be C, Ch, C++, Objective-C or Objective-C++. When compiling a program that includes such a file, the compiler will parse it according to where the *.h file is included, and your make target should set the appropriate dependencies, but a versioning system? I would only expect it to deliver the file version corresponding to whatever changeset you have made current, either by fetching the appropriate full copy of the file, or by applying the appropriate diff compared with the current version.
Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 83. Batteries in the TV remote now last for months.
> *.h files can be C, Ch, C++, Objective-C or Objective-C++. When compiling a program that includes such a file, the compiler will parse it according to where the *.h file is included, and your make target should set the appropriate dependencies, but a versioning system? I would only expect it to deliver the file version corresponding to whatever changeset you have made current, either by fetching the appropriate full copy of the file, or by applying the appropriate diff compared with the current version.
> Best regards, > Tony. > -- > hundred-and-one symptoms of being an internet addict: > 83. Batteries in the TV remote now last for months.
> -- > You received this message because you are subscribed to the Google Groups "GitHub" group. > To post to this group, send email to github@googlegroups.com. > To unsubscribe from this group, send email to github+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/github?hl=en.
Our .h/.c detection is still a little blurry between C, C++ and Obj-C. We have some plans to improve this based on files in the directory (if there's a .cpp, the .h is most likely C++) or keywords (If there's an @implementation keyword, it's most likely Obj-C) but we haven't had a chance to deploy it yet.
On Tuesday, May 3, 2011 at 1:40 AM, Chris Mear wrote: > On 3 May 2011, at 08:50, Tony Mechelynck <antoine.mechely...@gmail.com> wrote:
> > On 02/05/11 14:15, milasudril wrote: > > > How does github identify language? If I have a C++ include file, > > > should it end with .hpp rather than .h?
> > Does git need to know about language? (I mean, beyond the fact that the file is "text" or "binary")
> It doesn't, but GitHub has a 'graphs' feature which, among other things, does a percentage breakdown of what languages your project is written in.
> I'm guessing milasudril was just curious about how that worked.
> Chris
> > *.h files can be C, Ch, C++, Objective-C or Objective-C++. When compiling a program that includes such a file, the compiler will parse it according to where the *.h file is included, and your make target should set the appropriate dependencies, but a versioning system? I would only expect it to deliver the file version corresponding to whatever changeset you have made current, either by fetching the appropriate full copy of the file, or by applying the appropriate diff compared with the current version.
> > Best regards, > > Tony. > > -- > > hundred-and-one symptoms of being an internet addict: > > 83. Batteries in the TV remote now last for months.
> > -- > > You received this message because you are subscribed to the Google Groups "GitHub" group. > > To post to this group, send email to github@googlegroups.com. > > To unsubscribe from this group, send email to github+unsubscribe@googlegroups.com. > > For more options, visit this group at http://groups.google.com/group/github?hl=en.
> -- > You received this message because you are subscribed to the Google Groups "GitHub" group. > To post to this group, send email to github@googlegroups.com. > To unsubscribe from this group, send email to github+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/github?hl=en.
On May 3, 2:58 pm, Kyle Neath <k...@github.com> wrote:
> Our .h/.c detection is still a little blurry between C, C++ and Obj-C. We have some plans to improve this based on files in the directory (if there's a .cpp, the .h is most likely C++) or keywords (If there's an @implementation keyword, it's most likely Obj-C) but we haven't had a chance to deploy it yet.
Prolog code is also incorrectly identified as Perl code. The
extension .pl is used by both, so heuristics could be:
1) whether the file starts with a Perl shebang
2) signs that it is Prolog: whether the file has lines starting with %
(comments in Prolog), lines ending with ".", and frequent occurrences
of ":-".