From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Utkarsh Singh Newsgroups: gmane.emacs.devel Subject: Re: master 4a1e97b: New user option for Git log switches Date: Thu, 10 Jun 2021 20:26:09 +0530 Message-ID: <87o8cdsr92.fsf@gmail.com> References: <20210608233619.8439.15341@vcs0.savannah.gnu.org> <20210608233620.E895F209C6@vcs0.savannah.gnu.org> <875yyn2st3.fsf@gmx.de> <87o8ceuq9l.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17024"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Albinus , Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 10 16:57:46 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrM7u-0004EE-7F for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Jun 2021 16:57:46 +0200 Original-Received: from localhost ([::1]:60670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrM7t-00010U-61 for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Jun 2021 10:57:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrM6B-0006Kh-7I for emacs-devel@gnu.org; Thu, 10 Jun 2021 10:55:59 -0400 Original-Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:56298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrM69-0007nc-25 for emacs-devel@gnu.org; Thu, 10 Jun 2021 10:55:58 -0400 Original-Received: by mail-pj1-x1036.google.com with SMTP id k7so3807890pjf.5 for ; Thu, 10 Jun 2021 07:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=/A/dTottrtW9l72Tv46cqbHVhTw/ZFJiDFUKect04Zs=; b=VsMgrLXrZCNFIByvn5PWL1e2Rgy5DDHKhyOqGkFZgwyEADPVRIPn0UzJBxrODcWSKZ VSKDXuief4Ekyi99VlzwrGT4WNNZWLFr1GiWjjHgDHSr9G7y4vsSE7UQY6oqwYrR5jwK 9sTEGQPWsCW2puXoXUoq9pwNOrYwbG3oWZEkxvbitag0HXsEesF8mzYlDyhNzcQf9ON2 5mwCkgmnsy13LWPsw/CF6LrzVMzQjZ1SvAJ9ntj/u0zi1Dgxx7e1wbm7GO7AIguqKX2N BZR8Rdapx50cWUMjk0AIF0zdD2A+3R2hBlv0teIvAD87qV0DHvg5+4MzcdNehOI9Q11z JeYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=/A/dTottrtW9l72Tv46cqbHVhTw/ZFJiDFUKect04Zs=; b=gZX73EozGFW9Uc+vA7ybA0gLQXFQBa4/B4zGYn1lZZbFt1fddcfbS/YA5avR0TVDlI 9Eaik3ZZzARsV7WSI3LaSA5C+GzunTpWrB4lKEV+uAvIn5mY+Uu5ns6wBjwkYGnn1+qv PpwJJWTU2JedmWCr3w+G6NebSfItah2x6WfXVxAD67cXW3bw/AWYYf156bbtDJt+J7XZ cRAOUxmLb41sjSPIzWK/+vsdIBTaX71aY0ELOV7aFCln70Ivt4KBRcJDKIH0O9zDL6uB Q7tWzic8LrZyTV3HQ2vHx2HuYJOdTxHNLGT8RebWCcHRYDEgTYg4CHSjtg7ISdLbzMlq EozQ== X-Gm-Message-State: AOAM532g5uz04zrDpHWb0DkiEECfwcKRsfmfAPmHgoOMdnvZTEtIHFpI kUd3+BqHJeO63384aIdVKJQ= X-Google-Smtp-Source: ABdhPJwb0Rf2eFOvGqTk23mNwibX4f8A+006HkG6lGSTBJ6pDeGovdKLERq8odW0GYW3Kk1hYrQyIg== X-Received: by 2002:a17:90a:7aca:: with SMTP id b10mr3800422pjl.49.1623336955124; Thu, 10 Jun 2021 07:55:55 -0700 (PDT) Original-Received: from localhost ([103.77.1.83]) by smtp.gmail.com with ESMTPSA id n6sm3134967pgm.79.2021.06.10.07.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 07:55:54 -0700 (PDT) In-Reply-To: <87o8ceuq9l.fsf@gmx.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=utkarsh190601@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_OTHER_BAD_TLD=1.997, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270645 Archived-At: Hi Michael, Sorry for the late reply. On 2021-06-10, 09:34 +0200, Michael Albinus wrote: > Dmitry Gutov 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? Indeed! I think default value of `nil' is much more suitable but these are just my gut feelings as currently I don't have much knowledge of how VC is designed. -- Utkarsh Singh http://utkarshsingh.xyz