From: Junio C Hamano <gitster@pobox.com>
To: Luiz Ramos <luizzramos@yahoo.com.br>
Cc: Andreas Schwab <schwab@linux-m68k.org>, git@vger.kernel.org
Subject: Re: About git-diff
Date: Wed, 10 Aug 2011 21:49:57 -0700 [thread overview]
Message-ID: <7vr54sr1qi.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1313024025.97405.YahooMailClassic@web121818.mail.ne1.yahoo.com> (Luiz Ramos's message of "Wed, 10 Aug 2011 17:53:45 -0700 (PDT)")
Luiz Ramos <luizzramos@yahoo.com.br> writes:
> Given this, I'd suggest to change the inline documentation of git-diff (git help diff). In the version of my machine (1.7.4.4), it's like that:
>
> (snip)
> ...
> git diff [--options] <commit> [--] [<path>...]
> This form is to view the changes you have in your working tree
> relative to the named <commit>. You can use HEAD to compare it with
> the latest commit, or a branch name to compare with the tip of a
> different branch.
> ...
Strictly speaking, "the changes you have in your working tree" may be what
is confusing. Your working tree does _not_ have "changes"; it only has
"contents". Changes are perceived only if you compare it with something
else, as their _difference_.
This operation compares "the contents of tracked files in your working
tree" with "the contents recorded in the named <commit>"---the result of
this comparison comparison matches what humans perceive as "changes".
So perhaps updating the first sentence with:
Compare the contents of tracked files in your working tree with
what is recorded in the named <commit>.
would be all that is necessary. I didn't bother to look but I suspect we
have a simlar description for "git diff [--options] [--] [<path>...]"
form, and it should be updated in a similar way (the only difference is
that it compares "with what is recorded in the index").
next prev parent reply other threads:[~2011-08-11 4:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 1:52 About git-diff Luiz Ramos
2011-08-10 17:01 ` Andreas Schwab
2011-08-11 0:53 ` Luiz Ramos
2011-08-11 4:49 ` Junio C Hamano [this message]
2011-08-11 11:17 ` Luiz Ramos
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=7vr54sr1qi.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=luizzramos@yahoo.com.br \
--cc=schwab@linux-m68k.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).