Use git 'plumbing' command to avoid color codes. (Fixes #26)#27
Use git 'plumbing' command to avoid color codes. (Fixes #26)#27brunnre8 wants to merge 1 commit intodzhou121:masterfrom
Conversation
|
Thanks for the PR. I would prefer the commit hash personally. I think it gives you more info than just HEAD. Is it possible to get commit hash using this way? If not, we could probably use |
We probably could yes, although one really shouldn't be relying on the string returned by the porcelain script meant for human consumption as thismay change without warning between versions according to the git devs If I implement the commit hash lookup "the proper way" would you merge it? |
|
Yeah sure. Really appreciate that. |
|
What's the minimum git version you want to support? They added improved command options in 1.8 or so but this then breaks for the debian wheezy guys unless they use wheezy-backports All other distros of note including Ubuntu are above that. Supporting 1.8+ would make the code cleaner |
|
That's fine for me. |
This fixes the issue with the color codes it color.ui=always is set.
There would be a arguably bettter option here recommended by a git maintainer although that is git > 1.8
The solution here works with older versions of git and should not lead to compatibility issues.
Currently the displayed name in a detached state is HEAD. Is this ok or would you then prefer the commit hash?