git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Anders Melchiorsen <mail@cup.kalibalik.dk>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] Teach how to discard changes in the working directory
Date: Sun, 07 Sep 2008 15:48:50 -0700	[thread overview]
Message-ID: <7vtzcrk1wt.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1220825103-19599-1-git-send-email-mail@cup.kalibalik.dk> (Anders Melchiorsen's message of "Mon, 8 Sep 2008 00:05:01 +0200")

Anders Melchiorsen <mail@cup.kalibalik.dk> writes:

> Using "git checkout" to undo local changes is a hint that is often
> given in #git. This patch (part 2) adds the hint into the status
> output. A bit of restructuring appears in the initial patch.
>
> This is merely an RFC, I am not sure whether I like it myself :-).

While I think the patch means well, I personally think that the output is
already too chatty with these "friendly hints" about add/rm/reset.  After
this series, will we be adding 'use "git checkout HEAD -- <path>" to go
back to the state of the latest commit', and then "if you want to stage
only part of the change, use "git add -i <path>"?  "To temporarily remove
the change use "git stash"?

I would agree that "hint is often given in #git" is an indication that
people do not know "git checkout" to check out the path from the index to
get rid of the change.  I further suspect that "I modified my file and git
status says 'Changed but not updated'; what should I do" may not be asked
often anymore, which might owe the hint we have in status output.  Even
then, I do not necessarily agree that the status output (yes, I am also
questioning the existing hints as well) is the best place to teach these
people.

The approach would lead to insanely long output that reproduces the user
manual, and we should draw the line somewhere.  As I said, I suspect that
what we say is already too chatty.

  parent reply	other threads:[~2008-09-07 22:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-07 22:05 [RFC PATCH 0/2] Teach how to discard changes in the working directory Anders Melchiorsen
2008-09-07 22:05 ` [RFC PATCH 1/2] wt-status: Split header generation into three functions Anders Melchiorsen
2008-09-07 22:05   ` [RFC PATCH 2/2] wt-status: Teach how to discard changes in the working directory Anders Melchiorsen
2008-09-07 22:48 ` Junio C Hamano [this message]
2008-09-07 23:09   ` [RFC PATCH 0/2] " Pieter de Bie
2008-09-07 23:32   ` 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=7vtzcrk1wt.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mail@cup.kalibalik.dk \
    /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).