From: Michael J Gruber Date: Fri, 08 Jan 2010 15:40:26 GMT Subject: Re: Possible bug in git-completion.sh Message-ID: <4B4751EA.8060707@drmicha.warpmail.net> In-Reply-To: <4B474C73.8080100@mtu.net> Jon Schewe venit, vidit, dixit 08.01.2010 16:17: > If I create a directory "build" at the top of my git repository and then > add it to .gitignore, git behaves as expected and ignores the build > directory when checking status. Now git-completion.sh has some issues. I > have GIT_PS1_SHOWUNTRACKEDFILES to "1", so that I will be notified when > there are untracked files in my working directory. When I'm in the > top-level directory my prompt looks like expected, no '%'. However if I > change to the build directory I get a '%', even though git status shows > no untracked files. I see that git-completion.sh is using git ls-files > to check this and that function does indeed show output when in my build > directory. So the question here: Is git-completion.sh using ls-files > improperly or is ls-files behaving improperly? > Neither, but: output between status and ls-files is inconsistent. More specifically, different commands behave differently with respect to the treatment of subdirs. ls-files assumes "." implicitly, status does not. "git status ." should give you the same behavior is "git ls-files" in this regard. Michael