All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philip Oakley" <philipoakley@iee.org>
To: "Junio C Hamano" <gitster@pobox.com>, "Scott Chacon" <schacon@gmail.com>
Cc: "git list" <git@vger.kernel.org>
Subject: Re: git-scm.com refresh
Date: Sun, 6 May 2012 09:33:10 +0100	[thread overview]
Message-ID: <C0239E9A908644EAB06A52AE4A90F401@PhilipOakley> (raw)
In-Reply-To: 7vwr4q6qbh.fsf@alter.siamese.dyndns.org

From: "Junio C Hamano" <gitster@pobox.com> Sent: Sunday, May 06, 2012 2:39
AM
 > Scott Chacon <schacon@gmail.com> writes:
>
>>> As "diff" is listed in "Basic Snapshotting", and it will not
>>> be able to achieve that without being able to apply its output back to
>>> the
>>> working tree or to the index, I would suggest moving "apply" to the
>>> section as well.
>>
>> I have to disagree.  You are thinking of 'apply' from an internals
>> perspective I have to assume, because I use 'diff' every single day
>> for all sorts of stuff ("what is modified and unstaged?", "what is
>> modified and staged?", "what is different between these two branches?"
>> etc) ...
>
> The other day when I was surfing the 'net, I found a blog that was
> complaining about Git UI.  Some of the things were worth listening to, but
> there was one item I really had to scratch my head where the misconception
> behind the complaint came from.  I am typing from memory without bothering
> to go back to the site to quote, but the complaint essentially was:
>
>        Getting a patch is easy with "git diff", but to apply it you need
>        to make it an email and feed it to "git am"???  That's crazy.
>
<snip>

> "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.

The "--patch" option in [1] is corrupted(?) relative to my desktop in that 
it
misses the "(This is the default.)" ending (which most readers skip over 
when
speed reading).

The normal case of `git diff` for most users is simply as an extended 'what
changed' git status.

The `git apply` page [2] does say its about a diff:
    "DESCRIPTION - Reads the supplied diff output (i.e. "a patch") and
    applies it to files."
so it reads ok in reverse.

Perhaps for `git diff` man page
    NAME - git-diff - Show changes/, usually as a patch,/ between commits,
    commit and working tree, etc.

Then
    DESCRIPTION - Show changes ...two files on disk.
     /You can implement a diff patch by using git-apply(1)./

The main point is that the new user is probably unaware of many of the
conventions others take for granted. This gives them 'a clue' about `apply`.

Philip

[1] http://git-scm.com/docs/git-diff
[2] http://git-scm.com/docs/git-apply.html

  parent reply	other threads:[~2012-05-06  8:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 23:29 git-scm.com refresh Scott Chacon
2012-05-05  0:26 ` Jakub Narebski
2012-05-05 22:24   ` Scott Chacon
2012-05-05 23:20   ` Josh Juran
2012-05-05  1:31 ` Junio C Hamano
2012-05-05 16:47   ` Felipe Contreras
2012-05-05 22:38   ` Scott Chacon
2012-05-06  1:39     ` Junio C Hamano
2012-05-06  2:31       ` Felipe Contreras
2012-05-06  3:51       ` Scott Chacon
2012-05-06  8:33       ` Philip Oakley [this message]
2012-05-07 17:06         ` Junio C Hamano
2012-05-08 16:51           ` Junio C Hamano
2012-05-08 17:46             ` Andreas Schwab
2012-05-08 18:00               ` Junio C Hamano
2012-05-05  9:14 ` Andrew Sayers
2012-05-05 14:01 ` Felipe Contreras
2012-05-05 14:36 ` Philip Oakley
2012-05-06  0:08 ` Neal Kreitzinger
2012-05-06  5:10 ` Neal Kreitzinger
2012-05-06 11:04 ` Matthieu Moy
2012-05-06 13:36   ` Scott Chacon
2012-05-07  4:18 ` Christian Couder
2012-05-07 17:08   ` Ævar Arnfjörð Bjarmason
2012-05-07 15:08 ` A Large Angry SCM
2012-05-07 21:04 ` Matthieu Moy
2012-05-09 22:13   ` Heiko Voigt
2012-05-08 12:29 ` Antonio Ospite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C0239E9A908644EAB06A52AE4A90F401@PhilipOakley \
    --to=philipoakley@iee.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=schacon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.