Stop looking for .hg when we hit root

We used to do this, in a different way, but let's make it super explicit.

Fixes #127
pull/132/head
Justin Hileman 6 years ago
parent 728c52d6a3
commit aa6a8e3c1d

@ -163,12 +163,12 @@ function __bobthefish_hg_project_dir -S -d 'Print the current hg project base di
and return
set -l d $PWD
# Must check whether `$d = /` if using native dirname
while not [ -z "$d" ]
if [ -e $d/.hg ]
command hg root --cwd "$d" ^/dev/null
return
end
[ "$d" = '/' ]; and return
set d (__bobthefish_dirname $d)
end
end

Loading…
Cancel
Save