Re: [PATCH] reflog documentation: -n is an alias for --dry-run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 13, 2009 at 11:40 AM, Jeff King <peff@xxxxxxxx> 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@xxxxxxxxx
(+47) 986 59 656
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]