Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .gitattributes and define diff attribute for Fortran files #362

Merged
merged 1 commit into from
May 24, 2021

Conversation

phil-blain
Copy link
Member

PR checklist

  • Short (1 sentence) summary of your PR:
    See title
  • Developer(s):
    P Blain
  • Suggest PR reviewers from list in the column to the right.
  • Please copy the PR test results link or provide a summary of testing completed below.
    No Icepack tests needed.
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on CICE or any other models?
    • Yes
    • No (already in CICE)
  • Does this PR add any new test cases?
    • Yes
    • No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/.)
    • Yes
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please provide any additional information or relevant details below:

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

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
@apcraig apcraig changed the title Add .giattributes and define diff attribute for Fortran files Add .gitattributes and define diff attribute for Fortran files May 24, 2021
@apcraig apcraig merged commit 43a909a into CICE-Consortium:master May 24, 2021
@phil-blain phil-blain deleted the gitattributes branch February 13, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants