Honor default-language option#859
Conversation
|
I had the same intuition about the But it did not work, and thus I found the discussion and this PR. I wonder what stopped this from being merged? |
|
@dandavison I have just rebased this branch onto main - it went smoothly - the code does what it is supposed to and all tests pass. I could take it from here, but not sure if there was something else you had in mind with this - any chance you remember? At the least I could add tests for the new (and obvious) function of Can you allow me to push to this branch? Or should I supersede this pull request with a new one? |
|
Hi @imbrish, great! Thanks for looking at this. Please go ahead and supersede this with a new branch. I think this functionality makes sense to have (I'd probably use it for the same as you -- executable shell files). I can't remember why I didn't merge it, it's possible it was accidentally forgotten about. |
|
Is this PR obsolete now? |
|
Yep! Thanks. Superseded by #1655 |
Fixes #858
The
default-languageoption had been introduced initially in order to determine language forgit blame(where there are no file names). However, subsequentlygit blamecame to determine the language by inspecting the command line of the calling process (e.g. if delta sees the calling process isgit blame src/file.tsthen the language is typescript). Meanwhiledefault-languageacquired its obvious function of providing a default language for diffs; this PR fixes that.Note that the best place to set
default-languageis probably in your per-repository git settings. I.e.$my_repo/.git/config.