summary refs log tree commit diff stats
path: root/zsh/functions/pure
diff options
context:
space:
mode:
authorAlan Pearce2013-09-15 17:12:51 +0100
committerAlan Pearce2013-09-15 17:18:37 +0100
commitb0c124161c2df4e5762b918dfcbf142d61ea9a77 (patch)
tree67b7c7fa324d622d0f297f9a1594f54153d6a0e6 /zsh/functions/pure
parentf5035c449c73b3712078a43f044298f2498af405 (diff)
downloadnixfiles-b0c124161c2df4e5762b918dfcbf142d61ea9a77.tar.lz
nixfiles-b0c124161c2df4e5762b918dfcbf142d61ea9a77.tar.zst
nixfiles-b0c124161c2df4e5762b918dfcbf142d61ea9a77.zip
zsh: Optimise pure prompt git checking
Diffstat (limited to 'zsh/functions/pure')
-rw-r--r--zsh/functions/pure/prompt_pure_setup4
1 files changed, 2 insertions, 2 deletions
diff --git a/zsh/functions/pure/prompt_pure_setup b/zsh/functions/pure/prompt_pure_setup
index 9c2a7520..2cf91013 100644
--- a/zsh/functions/pure/prompt_pure_setup
+++ b/zsh/functions/pure/prompt_pure_setup
@@ -18,8 +18,8 @@
 
 # fastest possible way to check if repo is dirty
 prompt_pure_git_dirty() {
-	# check if we're in a git repo
-	command git rev-parse --is-inside-work-tree &>/dev/null || return
+	# check if we're at the top level of a git repo
+	[[ -d .git ]] || return
 	# check if it's dirty
 	command git diff --quiet --ignore-submodules HEAD &>/dev/null