From: Jeff King Date: Thu, 11 Jan 2018 22:21:55 GMT Subject: Re: [PATCH] doc/read-tree: remove obsolete remark Message-ID: <20180111222155.GA13570@sigill.intra.peff.net> In-Reply-To: On Thu, Jan 11, 2018 at 11:02:04AM -0800, Junio C Hamano wrote: > >> ---prefix=/:: > >> +--prefix=:: > >> Keep the current index contents, and read the contents > >> of the named tree-ish under the directory at ``. > >> The command will refuse to overwrite entries that already > >> - existed in the original index file. Note that the `/` > >> - value must end with a slash. > >> + existed in the original index file. > > > > Is it worth mentioning in the new world order that the slash is not > > implied? I.e., that you probably do want to say "--prefix=foo/" if you > > want the subdirectory "foo", but do not want to match "foobar"? > > Doesn't "git read-tree --prefix=previous HEAD^" add paths like > "previous/Documentation/Makefile" to the index, i.e. instead of > forcing you to have the required slash at the end, we give one for > free when it is missing? Yes, I think it does what you'd want with that path. But it would not do what you want by adding "previous-file". Which seems like a gotcha that should be mentioned. -Peff