emacs-devel
[Top][All Lists]
Advanced

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

Re: vc-git feature proposale: modeline and annotate


From: Uwe Brauer
Subject: Re: vc-git feature proposale: modeline and annotate
Date: Thu, 15 Dec 2022 09:26:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:

>> From: Uwe Brauer <oub@mat.ucm.es>
>> Date: Wed, 14 Dec 2022 22:36:56 +0100
>> 
>> I would like to suggest to have, at least optionally, the result 
>> of 
>> (shell-command "git name-rev HEAD")
>> 
>> In the modeline and/or   in the annotation buffer.

> What prevents you from having that?  IOW, why are you posting this
> here, when you can already customize the heck out your mode lines?

Are we talking about the mode line? I don't know how to obtain the
feature I discuss below. As for the vc-annotate command

Currently (taking auctex as an example) I obtain 

f7c0c735d (Tassilo Horn                   2020-09-04     1) ;;; tex.el --- 
Support for TeX documents.  -*- lexical-binding: t; -*-
fedf75103 (Per Abrahamsen                 1994-04-07     2) 
4b1c7015a (Ikumi Keita                    2022-03-19     3) ;; Copyright (C) 
1985-2022 Free Software Foundation, Inc.
f23d8867d (Ralf Angeli                    2004-05-02     4) 
5b40e9b1b (David Kastrup                  2005-03-28     5) ;; Maintainer: 
auctex-devel@gnu.org
7e5d40a53 (David Kastrup                  2003-02-15    14) 


But I would like to have something like this

master~2 (Tassilo Horn                   2020-09-04     1) ;;; tex.el --- 
Support for TeX documents.  -*- lexical-binding: t; -*-
master~100 (Per Abrahamsen               1994-04-07     2) 
master~40 (Ikumi Keita                   2022-03-19     3) ;; Copyright (C) 
1985-2022 Free Software Foundation, Inc.
master~10 (Ralf Angeli                   2004-05-02     4) 
master~5 (David Kastrup                  2005-03-28     5) ;; Maintainer: 
auctex-devel@gnu.org
master~100 (David Kastrup                2003-02-15    14) 

The doctring of vc-annotate does not indicate how to achieve that.
Can you tell me how?

>> I know that the HASH is more reliable but I find the result of the above
>> command sometimes a convenient alternative.

> We currently show the branch, but not the commit.  So what you want is
> to have the "HEAD" thingy to be on the mode line, literally?  Since
> that is almost always true, why is that addition useful?

No. I tend to checkout previous commits.

In such a case case the  command 

git name-rev HEAD

Would give, say, 

master~3 
meaning = three commits before HEAD on the master branch)! 


That I found  very useful

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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