From: Junio C Hamano Date: Mon, 07 May 2012 17:06:06 GMT Subject: Re: git-scm.com refresh Message-ID: <7vipg77wg1.fsf@alter.siamese.dyndns.org> In-Reply-To: "Philip Oakley" writes: > From: "Junio C Hamano" Sent: Sunday, May 06, 2012 2:39 > >> "diff" pairs with "apply", and "format-patch" pairs with "am". >> >> I wouldn't mind adding "git patch" as a built-in synonym/alias for "git >> apply", if you think that would make the above pairing more obvious. Many >> computer users know what "patch" does already even they have never used >> any SCM. > > Part of the problem is that the `git diff` man page [1] doesn't actively > tell the user that its result will be in a patch format, and that such a > patch can be `apply`ed. There are only 5 uses of 'apply' buried in the body > text, never as a command, as if they are special cases. There is a section > on the -p option, again it feels like it is a special case. Sounds like you spotted a good set of places in the documentation that need to be updated. > The normal case of `git diff` for most users is simply as an extended 'what > changed' git status. I think that use of "diff" is listed in "Inspection and Comparison" section, and I fully agree and is happy to see "diff" there as well. Of course, I wouldn't suggest "apply" to go next to that use of "diff". But what I have been discussing was the use of "diff" in the "Basic Snapshotting" section. I actually very often use "diff" paired with "apply" for my own work, not when working to integrate others' work. Also I do not think anybody would use "apply" to accept patches (that is what "am" is for), so listing it in "Email" section is doubly wrong. If for some reason the command Reference does not want to have "apply" next to "diff" listed in "Basic Snapshotting", I do not think there is any category on that page for the command to belong to. The above two were the primary things that triggered my reaction. When reshaping a multi-commit series, "git diff $rev1 $rev2 >P.diff" followed by "git apply