-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix the git command to obtain the dirty state of the repository #971
Fix the git command to obtain the dirty state of the repository #971
Conversation
We had a few problems with os.execute which is why we switched away from it #749 #692 Does this help you maybe? #809 (comment) Maybe removing |
@Stanzilla nope, it doesn't work. I'll try to come up with another solution. |
@Stanzilla I've also tried what's suggested in 809 but doesn't help either. |
567889e found it, paging @JanSchulz |
Unfortunately, I only send the patch, not found the cause: @vvartivarian-nbcu suggested the particular fix: #749 (comment) |
But reading this: http://www.lua.org/manual/5.1/manual.html#pdf-io.popen it looks like the solution could never work: t returns a handle and not the exit code:
|
See also http://stackoverflow.com/questions/7607384/getting-return-status-and-program-output this works: ---
-- Get the status of working dir
-- @return {bool}
---
function get_git_status()
local file = io.popen("git diff --quiet --ignore-submodules HEAD 2>nul")
-- This will get a table with some return stuff
-- rc[3] will be the signal, 0 or 1
local rc = {file:close()}
return rc[3] == 0
end -> Will send a PR |
See #974 for the PR, please test... :-) |
Closing this in favor of the more appropiate fix in #974 |
Fixes #928