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

isDetachedHead fails with non-english locales #29

Closed
DirtyHairy opened this issue Apr 26, 2016 · 4 comments
Closed

isDetachedHead fails with non-english locales #29

DirtyHairy opened this issue Apr 26, 2016 · 4 comments
Labels

Comments

@DirtyHairy
Copy link

DirtyHairy commented Apr 26, 2016

isDetachedHead parses git status output and looks for "HEAD detached at" Obviously, this fails for any non-english locale. I don't want to be a dick, but this is insanely brittle 😏

A possible improvement would be resetting LANG before running git. An even better solution would be checking the contents of .git/HEAD — this would avoid breakage from future changes of this message. I can provide a pull request if any of these changes would be OK with you.

@mattfarina mattfarina added the bug label Apr 26, 2016
@mattfarina
Copy link
Member

@DirtyHairy you don't have to be a dick to point out a bug. I've written plenty of them.

@DirtyHairy
Copy link
Author

😄 I was just trying to take the edge away from "insanely brittle". Anyway, the fix is easy enough, if you like, I can implement it and file a pull request.

@mattfarina
Copy link
Member

@DirtyHairy in #32 I already proposed a fix. Any feedback?

@DirtyHairy
Copy link
Author

Looks good to me.

mattfarina added a commit that referenced this issue Apr 27, 2016
Fixed #29: Git detached head detection only worked in english
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants