[Top][All Lists]

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

Re: master 4a1e97b: New user option for Git log switches

From: Michael Albinus
Subject: Re: master 4a1e97b: New user option for Git log switches
Date: Thu, 10 Jun 2021 09:34:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]