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

Not getting git status in 1.2.9 prompt #692

Closed
mwhitis opened this issue Nov 4, 2015 · 7 comments
Closed

Not getting git status in 1.2.9 prompt #692

mwhitis opened this issue Nov 4, 2015 · 7 comments

Comments

@mwhitis
Copy link

mwhitis commented Nov 4, 2015

I've been previously running the 1.1.4.1 version. Tried upgrading to 1.2.9 and am no longer getting git status in the cmd prompt, just the directory and lambda. Tried with both the included vendor git as well as an external copy of git that I've got already installed (2.5.1).

Any thoughts?

@Stanzilla
Copy link
Member

Can you try removing the old folders completely before updating, please?

@mwhitis
Copy link
Author

mwhitis commented Nov 4, 2015

@Stanzilla Yes, sorry, I did a clean install. Upgrade was probably not the right word. I deleted all the existing contents of my cmder folder, then extracted the contents of the 1.2.9 folder into it.

@mwhitis
Copy link
Author

mwhitis commented Nov 4, 2015

Ok, so I've been working with the cmder.lua, and have found the problem. It must be something weird on my machine. The issue is that the get_git_branch function is returning nothing. Specifically, io.popen("git branch 2>nul") is coming back empty. For some reason, that seems to be redirecting everything to nul instead of just stderr. If I run it from a command prompt, the behavior is as expected, but when getting called from the lua script everything is redirected. I've verified that the 1.1.4.1 git.lua uses the same code and is working properly. Not sure if anything changed in the lua interpreter between the two versions, but I'm inclined to think it may just be me since no one else has reported it.

@Stanzilla
Copy link
Member

Our Lua interpreter is clink, so you might get lucky and have it fixed by using a newer test build of that. You can get that from here https://www.dropbox.com/sh/hqbrpkf0dpmmizq/AADIJ4G5gjJ59JfFmr-3-Qc0a/20150923_1abb57/clink_DEV.zip?dl=0

@mwhitis
Copy link
Author

mwhitis commented Nov 4, 2015

I'm going to go ahead and close the issue. The clink update didn't help, but if I change the lua code from:

io.popen("git branch 2>nul")

to

io.popen("git branch")

It's working as expected.

@mwhitis mwhitis closed this as completed Nov 4, 2015
@Stanzilla
Copy link
Member

@vladimir-kotikov any idea?

@vladimir-kotikov
Copy link
Contributor

@Stanzilla, i saw this on one of my machines, but it doesn't repro right now. I updated ConEmu and git after that, so it might be an issue with one ot them.

@mwhitis, could you please post your git version and location (git --version and where git in console) and ConEmu version (conemu /?)

vladimir-kotikov pushed a commit to vladimir-kotikov/cmder that referenced this issue Nov 6, 2015
This increases performance of git prompt filter by fetching branch name directly from `.git/HEAD` file instead of spawning `git` process. Apart from increasing performance this may also solve potential problems with `git` output, as reported in cmderdev#692
sonictk pushed a commit to sonictk/cmder that referenced this issue May 21, 2016
This increases performance of git prompt filter by fetching branch name directly from `.git/HEAD` file instead of spawning `git` process. Apart from increasing performance this may also solve potential problems with `git` output, as reported in cmderdev#692
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

No branches or pull requests

3 participants