Skip to content

Instantly share code, notes, and snippets.

@derekschrock
Created August 31, 2018 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derekschrock/3ea6b2f2c2c13667259853ad07e4365b to your computer and use it in GitHub Desktop.
Save derekschrock/3ea6b2f2c2c13667259853ad07e4365b to your computer and use it in GitHub Desktop.
diff --git a/misc/units b/misc/units
index 790c214f..5d72244a 100755
--- a/misc/units
+++ b/misc/units
@@ -1872,7 +1872,7 @@ failed_git_marker ()
local f=$1
local l
- if type "git" > /dev/null 2>&1; then
+ if type "git" > /dev/null 2>&1 && [ -d .git ]; then
l=$(git ls-files -- "$f")
if [ -z "$l" ]; then
echo '<G>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment