git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] doc/read-tree: remove obsolete remark

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 9, 2018, 19:36 UTC
Message-ID
<xmqq373e6cyy.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20180109153034.22970-1-andreas.schacker@gmail.com>
"Andreas G. Schacker" <andreas.schacker@gmail.com> writes:
Show 6 quoted lines
> Earlier versions of `git read-tree` required the `--prefix` option value
> to end with a slash. This restriction was eventually lifted without a
> corresponding amendment to the documentation.
>
> Signed-off-by: Andreas G. Schacker <andreas.schacker@gmail.com>
> ---

Thanks. "read-tree --prefix=foo- $tree" is allowed these days, indeed. Will queue.

What is curious is that 34110cd4 ("Make 'unpack_trees()' have a separate source and destination index", 2008-03-06) seems to be the one that removed the check, and the removed contents do not seem to have much in common with the stated goal of the commit.

Show 22 quoted lines
>  Documentation/git-read-tree.txt | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
> index 72bd809fb..f2a07d54d 100644
> --- a/Documentation/git-read-tree.txt
> +++ b/Documentation/git-read-tree.txt
> @@ -81,12 +81,11 @@ OPTIONS
>  * when both sides add a path identically.  The resolution
>    is to add that path.
>  
> ---prefix=<prefix>/::
> +--prefix=<prefix>::
>  	Keep the current index contents, and read the contents
>  	of the named tree-ish under the directory at `<prefix>`.
>  	The command will refuse to overwrite entries that already
> -	existed in the original index file. Note that the `<prefix>/`
> -	value must end with a slash.
> +	existed in the original index file.
>  
>  --exclude-per-directory=<gitignore>::
>  	When running the command with `-u` and `-m` options, the
Previous: Andreas G. SchackerNext: Jeff King
Message 2 of 7 in “doc/read-tree: remove obsolete remark”
  1. doc/read-tree: remove obsolete remarkAndreas G. Schacker, Jan 9, 2018
  2. Junio C HamanoJan 9, 2018
  3. Jeff KingJan 11, 2018
  4. Junio C HamanoJan 11, 2018
  5. Jeff KingJan 11, 2018
  6. Junio C HamanoJan 11, 2018
  7. Jeff KingJan 12, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.