Subject: Re: [PATCH] git-checkout.txt: Document "git checkout <pathspec>" better

From: Torsten Bögershausen <[email-masked]>
Date: Fri, 12 Jun 2015 22:41:26 +0200

On 2015-06-12 06.49, Scott Schmit wrote:
> 'git checkout' with <paths> or `--patch` is used to restore modified or
> deleted paths to their original contents from the index or replace paths
> with the contents from a named <tree-ish> (most often a commit-ish)
> instead of switching branches.
-------------------
I will probably send a patch, the next days or so.
It feels as if we can split the long sentence, and differntiate
between the "restore" and "copy content from other tree-sh".
How about this:

'git checkout' [--] <pathspec>...::
	'git checkout' with <paths> is used to restore modified or
	deleted paths to their original contents from the index.

'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...::
	'git checkout' with [<tree-ish>] and <paths> or `--patch` is used
	to replace <paths> with the contents from a named <tree-ish>
	(most often a commit-ish) instead of switching branches.
	In this case, the `-b` and `--track` options are
	meaningless and giving either of them results in an error.  The
	<tree-ish> argument can be used to specify a specific tree-ish
	(i.e.  commit, tag or tree) to update the index for the given
	paths before updating the working tree.
+