From: Junio C Hamano Date: Sun, 08 Jun 2008 20:46:05 GMT Subject: Re: [PATCH] fix attribute handling in bare repositories Message-ID: <7vskvnirjm.fsf@gitster.siamese.dyndns.org> In-Reply-To: <484BF7BB.1090802@lsrfire.ath.cx> René Scharfe writes: > Nguyen Thai Ngoc Duy schrieb: >> Hi, >> >> Currently attr.c will read .gitattributes on disk no matter there is a >> real worktree or not. This can lead to strange behavior. > > Yes, it probably shouldn't do that. What about this patch? Hmm. I do not know if it breaks anything, but if you are indeed in a bare repository, the files the codepaths affected try to read would not exist anyway, so I am not sure what this would fix, other than changing the behaviour of check-attr from noticing that it was asked for nonsense and bail out to not noticing nor saying anything useful.