From: Erik Faye-Lund <kusmabite@googlemail.com>
To: Jeff King <peff@peff.net>
Cc: Nelson Elhage <nelhage@mit.edu>, git@vger.kernel.org
Subject: Re: [PATCH] reflog documentation: -n is an alias for --dry-run
Date: Sun, 13 Sep 2009 15:05:04 +0200 [thread overview]
Message-ID: <40aa078e0909130605s5b445fdclb22147ce070d0581@mail.gmail.com> (raw)
In-Reply-To: <20090913094032.GC14438@coredump.intra.peff.net>
On Sun, Sep 13, 2009 at 11:40 AM, Jeff King <peff@peff.net> wrote:
>> static const char reflog_expire_usage[] =
>> -"git reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
>> +"git reflog (show|expire) [--verbose] [-n | --dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
>
> Really? I think "git reflog show -n" is not about dry-run at all...
Indeed. However, the reflog expire uses -n as an alias for --dry-run,
according to lines 548-549 of my builtin-reflog.c (ddfdf5a):
if (!strcmp(arg, "--dry-run") || !strcmp(arg, "-n"))
cb.dry_run = 1;
...and this usage-string is only output from cmd_reflog_expire, so the
correct solution would IMO be to simply remove show from the
usage-string:
-"git reflog (show|expire) [--verbose] [-n | --dry-run] [--stale-fix]
[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
+"git reflog expire [--verbose] [-n | --dry-run] [--stale-fix]
[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
This issue ("reflog expire" incorrectly documenting "reflog show") was
present before this patch, though. At least the option "--stale-fix"
appears not to be valid for "reflog show".
--
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
prev parent reply other threads:[~2009-09-13 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-13 3:41 [PATCH] reflog documentation: -n is an alias for --dry-run Nelson Elhage
2009-09-13 9:40 ` Jeff King
2009-09-13 12:53 ` Nelson Elhage
2009-09-13 13:26 ` Jeff King
2009-09-13 13:05 ` Erik Faye-Lund [this message]
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=40aa078e0909130605s5b445fdclb22147ce070d0581@mail.gmail.com \
--to=kusmabite@googlemail.com \
--cc=git@vger.kernel.org \
--cc=nelhage@mit.edu \
--cc=peff@peff.net \
/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).