From e10cedb0a8967db28042528c99fae02ec241c7e1 Mon Sep 17 00:00:00 2001 From: ivanjonas <4935079+ivanjonas@users.noreply.github.com> Date: Wed, 4 Apr 2018 22:12:55 -0400 Subject: [PATCH] fix detection of dirty git repo The correct `git` flag is `--no-optional-locks` (plural), not `--no-optional-lock` (singular). This was breaking the command and causing dirty repos to be detected as clean. Compare to [`clink.lua` in the cmder repository](https://github.com/cmderdev/cmder/blob/master/vendor/clink.lua#L209). --- powerline_prompt.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline_prompt.lua b/powerline_prompt.lua index 62879cc..26ce686 100644 --- a/powerline_prompt.lua +++ b/powerline_prompt.lua @@ -186,7 +186,7 @@ end -- @return {bool} --- function get_git_status() - local file = io.popen("git --no-optional-lock status --porcelain 2>nul") + local file = io.popen("git --no-optional-locks status --porcelain 2>nul") for line in file:lines() do file:close() return false