From: Nguyen Thai Ngoc Duy Date: Fri, 08 Apr 2011 15:39:41 GMT Subject: Re: [PATCH 1/4] magic pathspec: add tentative ":/path/from/top/level" pathspec support Message-ID: In-Reply-To: <7vtye84wc3.fsf@alter.siamese.dyndns.org> On Fri, Apr 8, 2011 at 10:05 PM, Junio C Hamano wrote: > Nguyen Thai Ngoc Duy writes: > >> On Thu, Apr 7, 2011 at 11:18 PM, Junio C Hamano wrote: >> >>> This is so that you can say ":/.gitignore" and do not have to say >>> ":/:.gitignore". >> >> But then, say people have a file named @foo at top dir. They can write >> ":/@foo" to address the file. Some time later we decide to use '@' as >> magic, how can we re-train user's fingers? > > You don't.  The primary goal of short form is to be short to type from the > command line, and if you are in doubt, you can always disambiguate by > saying ":/:@foo", and you can use the terminating colon even if you are > sure "@" is not a magic in your version of git. If you allow me to use ":/@foo", I would (because it's convenient). And over time it will be carved in my muscle memory. Doubts and surprises after that are not good. Suppose I usually do "git co :/@foo", then '@' in later versions means many files, not just '@foo' at top. The '@' magic surprise would upset (enrage in the first few minutes maybe) me. My argument would be "it used to work fine" (against "you should use 'git co :/:@foo'" because it's less convenient that way). -- Duy