From: Michael Albinus <michael.albinus@gmx.de>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Utkarsh Singh <utkarsh190601@gmail.com>, emacs-devel@gnu.org
Subject: Re: master 4a1e97b: New user option for Git log switches
Date: Thu, 10 Jun 2021 09:34:30 +0200 [thread overview]
Message-ID: <87o8ceuq9l.fsf@gmx.de> (raw)
In-Reply-To: <d5a84eab-ce8a-47f0-83c9-edaeeb2bf932@yandex.ru> (Dmitry Gutov's message of "Wed, 9 Jun 2021 19:01:44 +0300")
Dmitry Gutov <dgutov@yandex.ru> writes:
> Hi Michael,
Hi Dmitry,
>>> +(defcustom vc-git-log-switches t
>>> + "String or list of strings specifying switches for Git log under VC."
>>> + :type '(choice (const :tag "None" t)
>>> + (string :tag "Argument String")
>>> + (repeat :tag "Argument List" :value ("") string))
>>> + :version "28.1")
>> Is there a reason to use the t value for "None"? All other log
>> switches
>> (vc-bzr-log-switches, vc-hg-log-switches, vc-src-log-switches) use nil
>> for this purpose, and it sounds also more natural to me as being an
>> empty list of strings.
>
> nil also works.
>
> The author followed the example of 'diff switches', where there is a
> certain hierarchy of variables to follow if the backend-specific one
> returns nil.
Existing vc-*-diff-switches declare
:type '(choice (const :tag "Unspecified" nil)
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string)))
Existing vc-*-log-switches declare
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string)))
> I figured it wouldn't be too bad to allow that possibility in the
> future, but you are probably right and we should simplify this.
In favor of uniformity, vc-git-log-switches might follow the scheme.
> 'hg log' and 'git log' are pretty different after all.
Sure. But we're speaking about defcustom types, aren't we?
Best regards, Michael.
next prev parent reply other threads:[~2021-06-10 7:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210608233619.8439.15341@vcs0.savannah.gnu.org>
[not found] ` <20210608233620.E895F209C6@vcs0.savannah.gnu.org>
2021-06-09 11:14 ` master 4a1e97b: New user option for Git log switches Michael Albinus
2021-06-09 16:01 ` Dmitry Gutov
2021-06-10 7:34 ` Michael Albinus [this message]
2021-06-10 14:56 ` Utkarsh Singh
2021-06-11 1:41 ` Dmitry Gutov
2021-06-11 1:40 ` Dmitry Gutov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8ceuq9l.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=utkarsh190601@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).