Skip to content

Commit

Permalink
Add '.giattributes' and define diff attribute for Fortran files (#362)
Browse files Browse the repository at this point in the history
This makes Git aware that files ending in '*.F90' are Fortran source
files, and activates the special regexes included in Git [1] so that
several commands are more useful since they recognize function,
subroutine and module boundaries:

- 'git diff' [1], [2]
- 'git grep' [3], [4]
- 'git log' [5]
- 'git blame' [6]

[1] https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header
[2] https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--W
[3] https://git-scm.com/docs/git-grep#Documentation/git-grep.txt--p
[4] https://git-scm.com/docs/git-grep#Documentation/git-grep.txt--W
[5] https://git-scm.com/docs/git-log#Documentation/git-log.txt--Lltstartgtltendgtltfilegt
[6] https://git-scm.com/docs/git-blame#Documentation/git-blame.txt--Lltstartgtltendgt
  • Loading branch information
phil-blain committed May 24, 2021
1 parent 5cf2232 commit 43a909a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.F90 diff=fortran

0 comments on commit 43a909a

Please sign in to comment.