From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: git <git@vger.kernel.org>
Subject: Re: Message from git reset: confusing?
Date: Wed, 05 Aug 2009 10:21:51 -0700 [thread overview]
Message-ID: <7v1vnqb2hc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <vpqab2e7064.fsf@bauges.imag.fr> (Matthieu Moy's message of "Wed\, 05 Aug 2009 17\:25\:23 +0200")
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> I was wondering what was the motivation for the output of "git merge":
You meant "git reset".
> $ git reset file
> file: locally modified
> $
First a tangent.
Removing this output _when no <path> is given_ would greatly reduce the
usability of the command.
I often find myself working on something that consists of more than one
steps, and initially I decide that these would form, say, two commits A,
and B. I first start adding the changes that are relevant to A, and my
index gradually gets closer to what A should finally look like.
But then I realize that logically commit B should come before commit A,
and it is time to "git reset" without any <path>s. The output would let
me review the changes (this includes changes pertaining to both A and B)
to help me recall which files would contain changes that are relevant to
B.
I agree that "git reset a-single-exact-filename" could be much more
silent. I would even say we do not even need -v in such a case.
But the thing is, that is a very narrow special case. The parameter the
command takes is not _a file_, but is a set of pathspecs, and I would
imagine that when you are in a situation similar to what I just described
in a larger project, you would appreciate the same reminder of modified
paths when you run the command like this:
$ git reset include/ arch/x86/
I wouldn't oppose to a patch that squelches the output when all pathspecs
given from the command line _exactly_ name existing paths, but I tend to
think that it would be usability regression if you do not show any output
in a case like the last example.
next prev parent reply other threads:[~2009-08-05 17:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 15:25 Message from git reset: confusing? Matthieu Moy
2009-08-05 17:21 ` Junio C Hamano [this message]
2009-08-05 17:42 ` Avery Pennarun
2009-08-05 18:07 ` John Tapsell
2009-08-05 18:25 ` Sverre Rabbelier
2009-08-06 9:42 ` Matthieu Moy
2009-08-06 19:21 ` Junio C Hamano
2009-08-07 20:24 ` [PATCH 1/2] Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN Matthieu Moy
2009-08-07 20:24 ` [PATCH 2/2 (v2)] reset: make the output more user-friendly Matthieu Moy
2009-08-07 21:20 ` Junio C Hamano
2009-08-08 7:44 ` Matthieu Moy
2009-08-17 17:31 ` Matthieu Moy
2009-08-17 19:50 ` Junio C Hamano
2009-08-21 8:57 ` [PATCH 1/2] Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN Matthieu Moy
2009-08-21 8:57 ` [PATCH 2/2 (v3)] reset: make the output more user-friendly Matthieu Moy
2009-08-22 5:44 ` Junio C Hamano
2009-08-22 7:52 ` Matthieu Moy
2009-08-23 2:33 ` Junio C Hamano
2009-08-23 10:42 ` Matthieu Moy
2009-08-23 11:45 ` Reece Dunn
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=7v1vnqb2hc.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.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).