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

Honor default-language option #859

Closed
wants to merge 1 commit into from
Closed

Conversation

dandavison
Copy link
Owner

Fixes #858

The default-language option had been introduced initially in order to determine language for git blame (where there are no file names). However, subsequently git blame came to determine the language by inspecting the command line of the calling process (e.g. if delta sees the calling process is git blame src/file.ts then the language is typescript). Meanwhile default-language acquired its obvious function of providing a default language for diffs; this PR fixes that.

Note that the best place to set default-language is probably in your per-repository git settings. I.e. $my_repo/.git/config.

@imbrish
Copy link
Contributor

imbrish commented Feb 11, 2024

I had the same intuition about the default-language option as described in #858, namely wanted to use it to assume bash syntax for the files without an extension.

But it did not work, and thus I found the discussion and this PR. I wonder what stopped this from being merged?

@imbrish
Copy link
Contributor

imbrish commented Mar 12, 2024

@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 default-language described above.

Can you allow me to push to this branch? Or should I supersede this pull request with a new one?

@dandavison
Copy link
Owner Author

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.

@michaelblyons
Copy link

Is this PR obsolete now?

@dandavison
Copy link
Owner Author

Yep! Thanks.

Superseded by #1655

@dandavison dandavison closed this Mar 16, 2024
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.

3 participants