From 254e80ed9dc18935d3f0c9f7f2b70c307ff04194 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 17 Dec 2021 18:22:28 +0300 Subject: [PATCH] bash_prompt: Run `ls-files` from the root of the repo Running `ls-files` in a subdirectory could miss files in other parts of the working tree. --- admin/prog/bash_prompt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/prog/bash_prompt b/admin/prog/bash_prompt index dc6f293..0436df4 100644 --- a/admin/prog/bash_prompt +++ b/admin/prog/bash_prompt @@ -46,7 +46,7 @@ prompt_git() { #git update-index --really-refresh -q &>/dev/null # check for unstaged changes - if [ -n "$(git ls-files --modified)" ]; then + if [ -n "$(git ls-files --modified :/)" ]; then s="$s*"; fi @@ -61,7 +61,7 @@ prompt_git() { fi # check for untracked files - if [ -n "$(git ls-files --others --exclude-standard)" ]; then + if [ -n "$(git ls-files --others --exclude-standard :/)" ]; then s="$s%"; fi -- 2.39.2