all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
@ 2014-02-27 17:57 Dmitry Gutov
  2014-02-28 13:48 ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Gutov @ 2014-02-27 17:57 UTC (permalink / raw
  To: 16897

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@gmail.com-20140219210406-y2s7lx244ojfl5on
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description:	Ubuntu 13.10





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-02-27 17:57 bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit Dmitry Gutov
@ 2014-02-28 13:48 ` Stefan Monnier
  2014-02-28 14:23   ` Dmitry Gutov
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2014-02-28 13:48 UTC (permalink / raw
  To: Dmitry Gutov; +Cc: 16897

> Perhaps just compare `files' with (list default-directory)?

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


        Stefan





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-02-28 13:48 ` Stefan Monnier
@ 2014-02-28 14:23   ` Dmitry Gutov
  2014-02-28 17:24     ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Gutov @ 2014-02-28 14:23 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 16897

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'?





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-02-28 14:23   ` Dmitry Gutov
@ 2014-02-28 17:24     ` Stefan Monnier
  2014-03-01  6:17       ` Dmitry Gutov
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2014-02-28 17:24 UTC (permalink / raw
  To: Dmitry Gutov; +Cc: 16897

>> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-02-28 17:24     ` Stefan Monnier
@ 2014-03-01  6:17       ` Dmitry Gutov
  2014-03-01 17:13         ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-01  6:17 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 16897

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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-03-01  6:17       ` Dmitry Gutov
@ 2014-03-01 17:13         ` Stefan Monnier
  2014-03-02  2:44           ` Dmitry Gutov
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2014-03-01 17:13 UTC (permalink / raw
  To: Dmitry Gutov; +Cc: 16897

> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-03-01 17:13         ` Stefan Monnier
@ 2014-03-02  2:44           ` Dmitry Gutov
  2014-03-07 20:54             ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-02  2:44 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 16897

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?





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-03-02  2:44           ` Dmitry Gutov
@ 2014-03-07 20:54             ` Stefan Monnier
  2014-03-08  0:48               ` Dmitry Gutov
  2014-03-08  7:02               ` Dmitry Gutov
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2014-03-07 20:54 UTC (permalink / raw
  To: Dmitry Gutov; +Cc: 16897

> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-03-07 20:54             ` Stefan Monnier
@ 2014-03-08  0:48               ` Dmitry Gutov
  2014-03-08  7:02               ` Dmitry Gutov
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-08  0:48 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 16897

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.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit
  2014-03-07 20:54             ` Stefan Monnier
  2014-03-08  0:48               ` Dmitry Gutov
@ 2014-03-08  7:02               ` Dmitry Gutov
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-08  7:02 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 16897-done

Version: 24.4

Seems to work fine.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-08  7:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-27 17:57 bug#16897: 24.3.50; vc-print-root-log doesn't show the top commit if it's a merge commit Dmitry Gutov
2014-02-28 13:48 ` Stefan Monnier
2014-02-28 14:23   ` Dmitry Gutov
2014-02-28 17:24     ` Stefan Monnier
2014-03-01  6:17       ` Dmitry Gutov
2014-03-01 17:13         ` Stefan Monnier
2014-03-02  2:44           ` Dmitry Gutov
2014-03-07 20:54             ` Stefan Monnier
2014-03-08  0:48               ` Dmitry Gutov
2014-03-08  7:02               ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.