changes in git not detected if root contains file named HEAD
Created by: dpinol
Shell: bash Operating system: OSX 10.12.4 Liquid Prompt version (tag, commit): 1.11
when there are git changes on a git checkout whose root contains a file named HEAD, the prompt does not display them (remains in green).
Problem is with line 929
shortstat="$(LC_ALL=C \git diff --shortstat HEAD 2>/dev/null)"
This is because git does not know if we refer to the HEAD file or the HEAD revision
master* ± git diff --shortstat HEAD fatal: ambiguous argument 'HEAD': both revision and filename Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]
I suggest this patch
shortstat="$(LC_ALL=C \git diff --shortstat HEAD -- 2>/dev/null)"