From: Jonathan Nieder <jrnieder@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
Michael J Gruber <git@drmicha.warpmail.net>,
Thomas Rast <trast@student.ethz.ch>
Subject: Re: [PATCH] reset: update help text
Date: Tue, 29 Mar 2011 16:04:57 -0500 [thread overview]
Message-ID: <20110329210457.GA14031@elie> (raw)
In-Reply-To: <1301404805-12095-1-git-send-email-pclouds@gmail.com>
(+cc: Christian, Michael, and Thomas)
Nguyễn Thái Ngọc Duy wrote:
> State --mixed is the default so users don't have to open up man page.
>
> Also make it clear how --hard and --merge are different.
Thanks; I think the goal of this patch is a good one.
> --- a/builtin/reset.c
> +++ b/builtin/reset.c
> @@ -243,17 +243,17 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
> struct commit *commit;
> char *reflog_action, msg[1024];
> const struct option options[] = {
> - OPT__QUIET(&quiet, "be quiet, only report errors"),
> OPT_SET_INT(0, "mixed", &reset_type,
> - "reset HEAD and index", MIXED),
> + "reset HEAD and index (default)", MIXED),
Nice.
> OPT_SET_INT(0, "soft", &reset_type, "reset only HEAD", SOFT),
> OPT_SET_INT(0, "hard", &reset_type,
> "reset HEAD, index and working tree", HARD),
> OPT_SET_INT(0, "merge", &reset_type,
> - "reset HEAD, index and working tree", MERGE),
> + "like --hard but keep local changes in working tree", MERGE),
> OPT_SET_INT(0, "keep", &reset_type,
> "reset HEAD but keep local changes", KEEP),
The description does not make it obvious to me how these two (--merge
and --keep) differ. I think the intent of the options are:
--keep:
start working on a different commit, carrying over local changes
(like "git checkout")
--merge:
return to <commit>, cancelling a merge-like operation that
creates some unmerged and some clean index entries
Maybe something along these lines could be ok starting point?
OPT_SET_INT(0, "keep", &reset_type,
"move to <commit>, carrying over local changes in working tree",
KEEP),
OPT_SET_INT(0, "merge", &reset_type,
"return to <commit>, cancelling failed merge or cherry-pick",
MERGE),
next prev parent reply other threads:[~2011-03-29 21:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 13:20 [PATCH] reset: update help text Nguyễn Thái Ngọc Duy
2011-03-29 13:29 ` Nguyen Thai Ngoc Duy
2011-03-29 21:04 ` Jonathan Nieder [this message]
2011-03-31 12:31 ` Nguyen Thai Ngoc Duy
2011-03-31 18:42 ` Jonathan Nieder
2011-03-31 21:44 ` Junio C Hamano
2011-03-31 21:57 ` Jonathan Nieder
2011-04-02 8:43 ` Nguyen Thai Ngoc Duy
2011-03-31 18:45 ` 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=20110329210457.GA14031@elie \
--to=jrnieder@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=trast@student.ethz.ch \
/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).