git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Tarmigan Casebolt <tarmigan+git@gmail.com>
Cc: git@vger.kernel.org, "Daniel Barkalow" <barkalow@iabervon.org>,
	"Peter Valdemar Mørch (Lists)" <4ux6as402@sneakemail.com>,
	"Lea Wiemann" <lewiemann@gmail.com>
Subject: Re: [PATCH] Add hints to revert documentation about other ways to undo changes
Date: Tue, 19 Aug 2008 11:56:58 -0700	[thread overview]
Message-ID: <7vk5ec7s05.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1219165591-19969-1-git-send-email-tarmigan+git@gmail.com> (Tarmigan Casebolt's message of "Tue, 19 Aug 2008 10:06:31 -0700")

Tarmigan Casebolt <tarmigan+git@gmail.com> writes:

> I put this in a Note: in the DESCRIPTION section.  If there is
> consensus about moving it somewhere else, I can send another patch.

I think a note in the description would be fine.

> +Note: Despite its name, 'git revert' may not undo changes in the way
> +that you expect.  If you want to throw away all uncommitted changes in
> +your working directory, you should see linkgit:git-reset[1],
> +particulary the '--hard' option.  If you want to extract specific
> +files as they were in another commit, you should see
> +linkgit:git-checkout[1], specifically the 'git checkout <commit> --
> +<filename>' syntax.  Take care with these alternatives as both will
> +discard uncommitted changes in your working directory.
> +

The last sentence makes the paragraph incoherent, doesn't it?

By starting this paragraph with "Despite its name", you are stating your
expectation that the people who find "git revert" nonintuitive are the
majority.  And you explain how to perform the operation that majority
would expect, which is to throw away uncommitted changes to go back to the
clean slate.  If that is what the target audience of this paragraph
expects to happen anyway, why do you need to caution against it in the
last sentence?

If the answer is "because it is not cut-and-dried which expectation is the
majority, and we try to be careful not to lose local modifications of
users", then the tone of the paragraph needs to become more neutral.

I'd suggest either dropping the first sentence altogether and starting the
paragraph with "If you want to throw away...", or replacing the first
sentence with "'git revert' is used to record a new commit to reverse the
effect of an earlier commit (often a faulty one)."

  parent reply	other threads:[~2008-08-19 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1219165591-19969-1-git-send-email-tarmigan+git@gmail.com>
2008-08-19 17:06 ` [PATCH] Add hints to revert documentation about other ways to undo changes Tarmigan
2008-08-19 18:56 ` Junio C Hamano [this message]
2008-08-19 19:50   ` Tarmigan Casebolt
2008-08-20 23:06     ` Junio C Hamano
2008-08-20 23:36       ` Tarmigan
2008-08-20 23:52         ` Junio C Hamano

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=7vk5ec7s05.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=4ux6as402@sneakemail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=lewiemann@gmail.com \
    --cc=tarmigan+git@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 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).