This website requires JavaScript.
Explore
Help
Register
Sign in
hlrs-software-stack
/
spack
Watch
7
Star
0
Fork
You've already forked spack
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
987b5a5b6f
spack
/
.gitattributes
4 lines
86 B
Text
Raw
Normal View
History
Unescape
Escape
git: add .gitattributes file (#13947) Add a line to .gitattributes so that `git grep -p` shows function names properly for `*.py` files. Without this, the class name is shown instead of the function for python files. This also causes diff output to use proper functions as hunk headers in `diff` output. Here's an example with `git grep -p`. Before: $ git grep -p spack_cc var/spack/repos/builtin/packages/athena var/spack/repos/builtin/packages/athena/package.py=class Athena(AutotoolsPackage): var/spack/repos/builtin/packages/athena/package.py: env.set('CC', spack_cc) var/spack/repos/builtin/packages/athena/package.py: env.set('LDR', spack_cc) After: $ git grep -p spack_cc var/spack/repos/builtin/packages/athena var/spack/repos/builtin/packages/athena/package.py= def setup_build_environment(self, env): var/spack/repos/builtin/packages/athena/package.py: env.set('CC', spack_cc) var/spack/repos/builtin/packages/athena/package.py: env.set('LDR', spack_cc) Here's an example with `diff`. Before: $ git show c5da94eb585d503248234ce18f24ffff4bd1f47c [...] @@ -28,6 +29,7 @@ print(u'\\xc3') # make it executable fs.set_executable(script_name) + filter_shebangs_in_directory('.', [script_name]) # read the unicode back in and see whether things work script = ex.Executable('./%s' % script_name) After: $ git show c5da94eb585d503248234ce18f24ffff4bd1f47c [...] @@ -28,6 +29,7 @@ def test_read_unicode(tmpdir): # make it executable fs.set_executable(script_name) + filter_shebangs_in_directory('.', [script_name]) # read the unicode back in and see whether things work script = ex.Executable('./%s' % script_name)
2019-12-02 09:35:38 +00:00
*.py diff=python
linguist: update .gitattributes for better linguist parsing (#20639) This adds two lines to `.gitattributes`: - [x] exclude vendored code from GitHub's language calculation - [x] recognize `.lp` files as Prolog (closest language to ASP that linguist supports) It looks like there have been two attempts (https://github.com/github/linguist/issues/3867, https://github.com/github/linguist/issues/4860) to add ASP as a language to Linguist, but it's not widespread enough to be standard yet (or at least the people who submitted the PRs haven't been able to show enough stats to prove it). We'll settle for calling ASP "Prolog" for now as that'll get us some syntax highlighting for `concretize.lp`.
2021-01-01 00:48:50 +00:00
*.lp linguist-language=Prolog
lib/spack/external/* linguist-vendored
Reference in a new issue
Copy permalink