Well, I was not aware of that function. Looking a little deeper into
it, it does not traverse above the current user $HOME (~/ or %HOME%).
This code needs to go all the way till the top. Since it does a
username comparison, it apprears a bit more expensive (based on gut
feel though).
my HOME is set to: c:/users/dhruva
My lisp expresssion: (locate-dominating-file
"c:/users/dhruva/stub/git/emacs/" ".dir-settings.el")
1. I place the .dir-settings.el under "C:/" and I get a nil
2. I move the file under HOME (c:/users/dhruva/.dir-settings.el) and get it.
=> It does not traverse beyond the HOME directory.