You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One problem with git diff is that there is no (to my knowledge) way to combine showing a green + row and a - row and adding different color to the actual changes on the row at the same time.
I'll illustrate the issue with a screenshot. In the following diff, it would be nice to have the path_out in the - row and another_path_output_var in the + row highlighted as the actual change.
I propose migrating from using the default git diff to diff-so-fancy.
Here is a screenshot with of same diff after changing my gitconfig so it uses diff-so-fancy:
I have personally not used diff-so-fancy. When I started searching for solutions to the problem this was what I found and liked the most. This is similar to how github shows the diff but I don't know what they use.
The text was updated successfully, but these errors were encountered:
Currently we're using https://hex.pm/packages/git_diff which is written in pure Elixir which means we can avoid shelling out to an external tool. I think if we are to switch the diff tool we'd prefer staying in Elixir land. That being said I totally agree that the output shown above gives much nicer user experience. If you'd like to search for other pure elixir solutions with this capability or enhance git_diff accordingly that'd definitely be appreciated.
GitDiff takes the output of executing git diff as seen here, so the actual diffing is not done in pure Elixir.
But now that you say that, this might be an issue. The diff-so-fancy does not match the output of git diff, but we cannot extend GitDiff to handle other tools output as it will no longer be git diff.
One problem with git diff is that there is no (to my knowledge) way to combine showing a green
+
row and a-
row and adding different color to the actual changes on the row at the same time.I'll illustrate the issue with a screenshot. In the following diff, it would be nice to have the
![image](https://user-images.githubusercontent.com/6518376/104031451-69369200-51d5-11eb-8e7a-9c96354532d4.png)
path_out
in the-
row andanother_path_output_var
in the+
row highlighted as the actual change.I propose migrating from using the default git diff to diff-so-fancy.
Here is a screenshot with of same diff after changing my gitconfig so it uses diff-so-fancy:
![image](https://user-images.githubusercontent.com/6518376/104031339-4310f200-51d5-11eb-8262-670ad579167b.png)
I have personally not used diff-so-fancy. When I started searching for solutions to the problem this was what I found and liked the most. This is similar to how github shows the diff but I don't know what they use.
The text was updated successfully, but these errors were encountered: