Merged
Conversation
In Git 2.25 there comes native support for Elixir definitions. That will make `git diff --function-context` work properly. Additionally it makes diff headers to contain name of enclosing function. I hope that this will work in GitHub diffs as well.
josevalim
approved these changes
Feb 16, 2020
Member
|
Would it make sense to generate a |
Contributor
Author
|
@michalmuskala I would rather document such thing and encourage people to add it to their own global Git configuration: $ mkdir -p ~/.config/git
$ printf '*.ex diff=elixir\n*.exs diff=elixir\n' >> ~/.config/git/attributes |
Member
|
Makes sense. Given I know nothing about how git attributes work - why wouldn't that be a default now that git has this support? Is there some conflict on the extensions? |
Contributor
Author
|
Because Git do not support default attributes for any files at all. It would be big change in Git to provide defaults and I do not have time to go through that right now. TL;DR there is no "default" attributes in Git, everything uses the same and user can define them on their own |
Member
|
Makes sense. Thank you for explaining. |
Member
|
Thanks @hauleth! 💜 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Git 2.25 there comes native support for Elixir definitions. That will
make
git diff --function-contextwork properly. Additionally it makesdiff headers to contain name of enclosing function.
I hope that this will work in GitHub diffs as well.