git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 28, 2010, 16:29 UTC
Message-ID
<vpqy6cvwovv.fsf@bauges.imag.fr>
In-Reply-To
<7vlj8v7ftw.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>
>> The documentation says the syntax is --format[='<format>'], match it in
>> the implementation.
>>
>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
>> ---
>> 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/
Previous: Junio C HamanoNext: Matthieu Moy
Message 3 of 5 in “rev-list: accept --format without argument”
  1. rev-list: accept --format without argumentMatthieu Moy, Jul 28, 2010
  2. Junio C HamanoJul 28, 2010
  3. Matthieu MoyJul 28, 2010
  4. Matthieu MoyAug 4, 2010
  5. Junio C HamanoAug 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.