GNU bug report logs - #16897
24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Thu, 27 Feb 2014 17:58:01 UTC

Severity: normal

Found in version 24.3.50

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16897 in the body.
You can then email your comments to 16897 AT debbugs.gnu.org in the normal way.

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-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Thu, 27 Feb 2014 17:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Feb 2014 17:58:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 vc-print-root-log doesn't show the top commit if it's a merge commit
Date: Thu, 27 Feb 2014 19:57:29 +0200
1. Open a Git repo.

2. Do a simple, non-fast-forward merge from some branch into the current
(but it has to succeed without conflicts).

3. Press `C-x v L`.

The top commit will be hidden, apparently because 'git log' is passed
the 'path' argument, namely the root directory of the repository, and so
it somehow ignores the commit that doesn't add anything to the histroy
beyond the contents of its parents.

Using Git 1.8.3.2.

If I replace `files' with 'nil' in `vc-git-print-log', the top commit is
displayed. Not sure how to handle this best. Perhaps just compare
`files' with (list default-directory)?

That's assuming at least some other backend needs a non-nil valus of
`files' to retrieve the root log.


In GNU Emacs 24.3.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
 of 2014-02-20 on axl
Repository revision: 116484 lekktu <at> gmail.com-20140219210406-y2s7lx244ojfl5on
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description:	Ubuntu 13.10




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Fri, 28 Feb 2014 13:49:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50;
 vc-print-root-log doesn't show the top commit if it's a merge commit
Date: Fri, 28 Feb 2014 08:48:40 -0500
> Perhaps just compare `files' with (list default-directory)?

Yes, something like that is needed for other circumstances as well,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Fri, 28 Feb 2014 14:24:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit
 if it's a merge commit
Date: Fri, 28 Feb 2014 16:23:20 +0200
On 28.02.2014 15:48, Stefan Monnier wrote:
> Yes, something like that is needed for other circumstances as well,

Do you mean other uses of `vc-git-print-log'?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Fri, 28 Feb 2014 17:26:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50;
 vc-print-root-log doesn't show the top commit if it's a merge commit
Date: Fri, 28 Feb 2014 12:24:59 -0500
>> Yes, something like that is needed for other circumstances as well,
> Do you mean other uses of `vc-git-print-log'?

No: other circumstances where we pass a list of files to Git.
IOW, maybe vc-git-command should support turning a (list
default-directory) into nil.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Sat, 01 Mar 2014 06:18:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit
 if it's a merge commit
Date: Sat, 01 Mar 2014 08:17:21 +0200
On 28.02.2014 19:24, Stefan Monnier wrote:
>>> Yes, something like that is needed for other circumstances as well,
>> Do you mean other uses of `vc-git-print-log'?
>
> No: other circumstances where we pass a list of files to Git.
> IOW, maybe vc-git-command should support turning a (list
> default-directory) into nil.

This sort of assumes that default-directory is always the root dir. 
Which isn't true.

Of course it seems that in practice, whenever file-or-list is the same 
as (list default-directory), the latter *is* the root dir. But that's a 
shaky assumption.

I'm not sure I want to spend another process call to determine what the 
actual root dir is each time, so maybe we should limit the fix to 
`vc-git-print-log'.

At least, until any other command is known to exhibit a similar bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Sat, 01 Mar 2014 17:14:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50;
 vc-print-root-log doesn't show the top commit if it's a merge commit
Date: Sat, 01 Mar 2014 12:13:27 -0500
> This sort of assumes that default-directory is always the root dir.

Obviously, we'd want to compare to root-dir, not to default-dir.
And we'd want to cache the result so as to avoid looking for the root
directory repeatedly.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Sun, 02 Mar 2014 02:45:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit
 if it's a merge commit
Date: Sun, 02 Mar 2014 04:44:48 +0200
On 01.03.2014 19:13, Stefan Monnier wrote:
> Obviously, we'd want to compare to root-dir, not to default-dir.
> And we'd want to cache the result so as to avoid looking for the root
> directory repeatedly.

`vc-git-root' already does caching, but it uses `vc-file-prop-obarray'.

We would be calling it on directories, so these cache entries would 
never be invalidated. Do you foresee any problems with that?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Fri, 07 Mar 2014 20:55:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50;
 vc-print-root-log doesn't show the top commit if it's a merge commit
Date: Fri, 07 Mar 2014 15:54:25 -0500
> We would be calling it on directories, so these cache entries would never be
> invalidated. Do you foresee any problems with that?

I think it's OK.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16897; Package emacs. (Sat, 08 Mar 2014 00:49:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16897 <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit
 if it's a merge commit
Date: Sat, 08 Mar 2014 02:48:03 +0200
On 07.03.2014 22:54, Stefan Monnier wrote:
> I think it's OK.

OK, I'll go ahead and make the change for 24.4.





Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Sat, 08 Mar 2014 07:03:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Sat, 08 Mar 2014 07:03:03 GMT) Full text and rfc822 format available.

Message #34 received at 16897-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16897-done <at> debbugs.gnu.org
Subject: Re: bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit
 if it's a merge commit
Date: Sat, 08 Mar 2014 09:02:43 +0200
Version: 24.4

Seems to work fine.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Apr 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 237 days ago.

Previous Next


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