Re: [PATCH] rev-list: accept --format without argument

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Matthieu Moy <Matthieu.Moy@xxxxxxx> writes:
>
>> The documentation says the syntax is --format[='<format>'], match it in
>> the implementation.
>>
>> Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx>
>> ---
>> Not that it's terribly usefull, but better be consistant ...
>
> Hmm, I do not care too deeply either way as I do not expect anybody sane
> to have used, nor learn from this patch and start using, --format without
> any formatting specification, but it somehow feels that this patch takes
> consistency the wrong way.

The other way would be stg like:

diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index d78e121..9b6f389 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -1,5 +1,5 @@
 --pretty[='<format>']::
---format[='<format>']::
+--format='<format>'::
 
        Pretty-print the contents of the commit logs in a given format,
        where '<format>' can be one of 'oneline', 'short', 'medium',

But I'd say it's simpler to be able to say "--format is an alias for
--pretty" than "--format is an alias for --pretty _except that ..._".

And actually,

git rev-list --format

is not that stupid if you read it as "list revisions and do some
formatting as you do it".

(but I don't care much either ;-) )

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]