GNU bug report logs - #79842
make use of ~/.gitconfig

Previous Next

Package: vc-dwim;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Sun, 16 Nov 2025 07:54:02 UTC

Severity: normal

To reply to this bug, email your comments to 79842 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-vc-dwim <at> gnu.org:
bug#79842; Package vc-dwim. (Sun, 16 Nov 2025 07:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-vc-dwim <at> gnu.org. (Sun, 16 Nov 2025 07:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-vc-dwim <at> gnu.org
Subject: make use of ~/.gitconfig
Date: Sun, 16 Nov 2025 08:52:52 +0100
Hi,

With vc-dwim 1.10:

$ vc-chlog --width 80 | head -n 1
2025-11-16  bruno  <bruno <at> nimes.(none)>

Well, this is neither my full name nor my email address. Since nowadays
most people who use a VCS (also) use git, it would make sense to take
the values from ~/.gitconfig . In other words, use

  $(git config user.name)  <$(git config user.email)>

Bruno







Information forwarded to bug-vc-dwim <at> gnu.org:
bug#79842; Package vc-dwim. (Sun, 16 Nov 2025 08:51:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Collin Funk <collin.funk1 <at> gmail.com>
To: Bruno Haible via bug-vc-dwim via vc-dwim is a version-control-agnostic
 ChangeLog diff and commit tool <bug-vc-dwim <at> gnu.org>
Cc: Bruno Haible <bruno <at> clisp.org>, 79842 <at> debbugs.gnu.org
Subject: Re: [Bug-vc-dwim] bug#79842: make use of ~/.gitconfig
Date: Sun, 16 Nov 2025 00:50:21 -0800
[Message part 1 (text/plain, inline)]
Bruno Haible via bug-vc-dwim via vc-dwim is a version-control-agnostic
ChangeLog diff and commit tool <bug-vc-dwim <at> gnu.org> writes:

> With vc-dwim 1.10:
>
> $ vc-chlog --width 80 | head -n 1
> 2025-11-16  bruno  <bruno <at> nimes.(none)>
>
> Well, this is neither my full name nor my email address. Since nowadays
> most people who use a VCS (also) use git, it would make sense to take
> the values from ~/.gitconfig . In other words, use
>
>   $(git config user.name)  <$(git config user.email)>

I assume you want to avoid setting them from the command-line? You can
configure them like this:

    $ cat ~/.vc-chlogrc 
    # ~/.vc-chlogrc
    
    --address "collin.funk1 <at> gmail.com"
    --user-name "Collin Funk"
    
    # Local Variables:
    # mode: shell-script
    # End:

I wrote a patch for your idea, though. Let's see what Jim thinks.

There are some other ways to guess the user's full name like the gecos
field:

    $ getent passwd | grep `id -nu` | cut -d : -f5
    Collin Funk

But that is probably a bit overkill. :)

Collin

[0001-vc-chlog-use-the-user-name-and-email-from-git-if-set.patch (text/x-patch, attachment)]

Information forwarded to bug-vc-dwim <at> gnu.org:
bug#79842; Package vc-dwim. (Sun, 16 Nov 2025 08:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-vc-dwim <at> gnu.org:
bug#79842; Package vc-dwim. (Sun, 16 Nov 2025 10:38:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: Collin Funk <collin.funk1 <at> gmail.com>
Cc: bug-vc-dwim <at> gnu.org, 79842 <at> debbugs.gnu.org
Subject: Re: [Bug-vc-dwim] bug#79842: make use of ~/.gitconfig
Date: Sun, 16 Nov 2025 11:37:20 +0100
Collin Funk wrote:
> I assume you want to avoid setting them from the command-line? You can
> configure them like this:
> 
>     $ cat ~/.vc-chlogrc 
>     # ~/.vc-chlogrc
>     
>     --address "collin.funk1 <at> gmail.com"
>     --user-name "Collin Funk"

That does what I need; thanks.

Still, for a first-time user of vc-chlog, it would be one step less
to configure if ~/.gitconfig was taken into account.

> I wrote a patch

Btw, the determination of the domain in this line:

  domain=`(domainname) 2>/dev/null || (hostname -d) 2>/dev/null || echo unknown_domain`

could be improved:
  - The 'domainname' program returns the NIS/YP name, whereas what is needed
    here is the 'dnsdomainname' program [1].
  - When not configured, both 'dnsdomainname' and 'hostname -d' return
    the empty string, with exit code 0. The default 'unknown_domain'
    therefore does not apply.

Bruno

[1] https://www.kernel.org/doc/man-pages/online/pages/man1/domainname.1.html







Information forwarded to bug-vc-dwim <at> gnu.org:
bug#79842; Package vc-dwim. (Sun, 16 Nov 2025 10:38:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.