.gitattributes override is not accepted #5600
-
Hello, I have edited my .gitattributes file in order to define the languages for my code files. Here is my .gitattributes file: Example 1: Example 2: I have also re-commited everything so that all files get re-indexed. But it didn't help
What am I doing wrong? Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The first thing to point out is anything with With that in mind, if we take Search completely out of the question, we can see your overrides are accepted and working: $ github-linguist . --breakdown
82.56% 451344 C
7.21% 39399 R
5.19% 28348 Makefile
1.84% 10063 C++
1.43% 7810 Batchfile
1.15% 6306 Yacc
0.63% 3435 Lex
Batchfile:
3264_mixer/foundry_3264_mixer.bat
3264_mixer/foundry_3264_mixer_manual.bat
make_mingw32.bat
visual_studio/vc_make_3264.bat
C++:
3264_mixer/foundry_3264_mixer.cpp
R:
68k.r
PiPL_carbon.r
PiPL_classic.r
PiPL_macho.r
PiPL_universal.r
pipl_common.r
scripting.r
ui_mac.r
Makefile:
FilterFoundry.make
Makefile.mac
Makefile.win
visual_studio/nmake.mak
visual_studio/nmake64.mak
C:
PARM.h
c.h
cwprefix.h
ff.h
ff_misc.h
funcs.c
funcs.h
load_mac.c
load_win.c
main.c
make.c
make_mac.c
make_win.c
manifest.c
manifest.h
node.c
node.h
obfusc.c
preview.c
preview.h
preview_mac.c
process.c
read.c
save.c
scripting.c
scripting.h
symtab.c
symtab.h
telegraphics_common/adobeplugin/A4Stuff.h
telegraphics_common/adobeplugin/dllmain.c
telegraphics_common/adobeplugin/entry.h
telegraphics_common/adobeplugin/world.h
telegraphics_common/tt/calc_std_state.c
telegraphics_common/tt/calc_std_state.h
telegraphics_common/tt/carbonstuff.h
telegraphics_common/tt/choosefile.h
telegraphics_common/tt/choosefile_mac.c
telegraphics_common/tt/choosefile_nav.c
telegraphics_common/tt/choosefile_sf.c
telegraphics_common/tt/choosefile_win.c
telegraphics_common/tt/compat_string.c
telegraphics_common/tt/compat_string.h
telegraphics_common/tt/compat_win.c
telegraphics_common/tt/compat_win.h
telegraphics_common/tt/dbg.h
telegraphics_common/tt/dbg_mac.c
telegraphics_common/tt/dbg_win.c
telegraphics_common/tt/dlg.c
telegraphics_common/tt/dlg.h
telegraphics_common/tt/file_compat.h
telegraphics_common/tt/file_compat_unix.c
telegraphics_common/tt/file_compat_win.c
telegraphics_common/tt/menu.c
telegraphics_common/tt/menu.h
telegraphics_common/tt/misc-mac.c
telegraphics_common/tt/misc-mac.h
telegraphics_common/tt/misc.c
telegraphics_common/tt/misc.h
telegraphics_common/tt/qd.c
telegraphics_common/tt/qd.h
telegraphics_common/tt/scroll.c
telegraphics_common/tt/scroll.h
telegraphics_common/tt/sprintf_tiny.c
telegraphics_common/tt/sprintf_tiny.h
telegraphics_common/tt/str.c
telegraphics_common/tt/str.h
telegraphics_common/tt/ui_compat.h
telegraphics_common/tt/ui_compat_mac.c
telegraphics_common/tt/ui_compat_win.c
telegraphics_common/tt/wind.c
telegraphics_common/tt/wind.h
ui.c
ui.h
ui_build.c
ui_build_win.c
ui_mac.c
ui_win.c
unistd.h
version.h
versioninfo_modify_win.c
versioninfo_modify_win.h
wpj/sdkddkver.h
Lex:
lexer.l
Yacc:
parser.y
$ As you can see both of your examples have taken effect from a Linguist perspective and the sidebar percentage breakdown reflects this... the results of the links however won't as that's Search as previously mentioned. So from a Linguist perspective, everything is working as expected and your overrides have taken effect. As an aside:
We've got you covered: https://github.com/github/linguist/blob/master/docs/troubleshooting.md#my-ccobjective-c-h-header-file-is-detected-as-the-wrong-language 😄 It's probably got something within it that matches the C++ heuristic, hence the classification. |
Beta Was this translation helpful? Give feedback.
The first thing to point out is anything with
search
in the URL is from Search and is completely independent of Linguist so can take time to update to reflect changes to languages when implementing an override. Generally modifying the files in question result in them being reindexed with the updated language.With that in mind, if we take Search completely out of the question, we can see your overrides are accepted and working: