* vc-git-log-incoming
@ 2010-06-02 8:49 Miles Bader
2010-06-02 9:23 ` vc-git-log-incoming Dan Nicolaescu
0 siblings, 1 reply; 4+ messages in thread
From: Miles Bader @ 2010-06-02 8:49 UTC (permalink / raw)
To: emacs-devel
vc-git-log-incoming seems to have a bunch of problems:
(1) By default, it uses "git log HEAD..XXX", where XXX is
(vc-git-compute-remote), but this is only correct in some cases,
because the current branch and the branch being pulled from don't
necessarily have the same name (it failed on my emacs checkout, for
instance).
More correct would be to just use "HEAD..@{upstream}", which should
use the actual upstream branch; however I think the "@{upstream}"
feature was only added in git 1.7.0.
(2) If the user doesn't use the default, it just does "git log YYY",
where YYY is what the user entered, but this is probably not what's
wanted; really it should use "HEAD..YYY".
(3) Most seriously, just using git-log like this doesn't actually give
a list of what will be pulled, because "git pull" first updates the
local copy of the remote's branches, whereas "git log" does not.
I'm not totally sure how to do this correctly -- you can get the
range of revisions that would be added during pulling (by the
underlying call to "git fetch") by using "git fetch --dry-run", but
that's not going to give you a log output....
Thanks,
-miles
--
Carefully crafted initial estimates reward you not only with
reduced computational effort, but also with understanding and
increased self-esteem. -- Numerical methods in C,
Chapter 9. "Root Finding and Nonlinear Sets of Equations"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vc-git-log-incoming
2010-06-02 8:49 vc-git-log-incoming Miles Bader
@ 2010-06-02 9:23 ` Dan Nicolaescu
2010-06-02 10:38 ` vc-git-log-incoming Miles Bader
0 siblings, 1 reply; 4+ messages in thread
From: Dan Nicolaescu @ 2010-06-02 9:23 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Miles Bader <miles@gnu.org> writes:
> vc-git-log-incoming seems to have a bunch of problems:
I was just typing a message asking what to do about some of these...
Input from more experienced git users would be appreciated.
> (1) By default, it uses "git log HEAD..XXX", where XXX is
> (vc-git-compute-remote), but this is only correct in some cases,
> because the current branch and the branch being pulled from don't
> necessarily have the same name (it failed on my emacs checkout, for
> instance).
>
> More correct would be to just use "HEAD..@{upstream}", which should
> use the actual upstream branch; however I think the "@{upstream}"
> feature was only added in git 1.7.0.
IMHO that would be fine too, we won't release emacs-24 anytime soon.
>
> (2) If the user doesn't use the default, it just does "git log YYY",
> where YYY is what the user entered, but this is probably not what's
> wanted; really it should use "HEAD..YYY".
That should not be too hard to do.
> (3) Most seriously, just using git-log like this doesn't actually give
> a list of what will be pulled, because "git pull" first updates the
> local copy of the remote's branches, whereas "git log" does not.
>
> I'm not totally sure how to do this correctly -- you can get the
> range of revisions that would be added during pulling (by the
> underlying call to "git fetch") by using "git fetch --dry-run", but
> that's not going to give you a log output....
This is the main problem... maybe vc-git-log-incoming can look for an
empty "git log" output, and offer to run "git fetch", and then rerun log...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vc-git-log-incoming
2010-06-02 9:23 ` vc-git-log-incoming Dan Nicolaescu
@ 2010-06-02 10:38 ` Miles Bader
2010-06-03 23:41 ` vc-git-log-incoming Dan Nicolaescu
0 siblings, 1 reply; 4+ messages in thread
From: Miles Bader @ 2010-06-02 10:38 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
Dan Nicolaescu <dann@gnu.org> writes:
> This is the main problem... maybe vc-git-log-incoming can look for an
> empty "git log" output, and offer to run "git fetch", and then rerun log...
I think the most natural way would be to define vc-log-incoming so that
it's allowed to have some "reasonable" side-effect, and then just always
use "git fetch" first for git. This probably mirrors what users
generally do anyway.
-Miles
--
Kilt, n. A costume sometimes worn by Scotchmen [sic] in America and Americans
in Scotland.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vc-git-log-incoming
2010-06-02 10:38 ` vc-git-log-incoming Miles Bader
@ 2010-06-03 23:41 ` Dan Nicolaescu
0 siblings, 0 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2010-06-03 23:41 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Miles Bader <miles@gnu.org> writes:
> Dan Nicolaescu <dann@gnu.org> writes:
>> This is the main problem... maybe vc-git-log-incoming can look for an
>> empty "git log" output, and offer to run "git fetch", and then rerun log...
>
> I think the most natural way would be to define vc-log-incoming so that
> it's allowed to have some "reasonable" side-effect, and then just always
> use "git fetch" first for git. This probably mirrors what users
> generally do anyway.
Something with that effect is now checked in.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-03 23:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 8:49 vc-git-log-incoming Miles Bader
2010-06-02 9:23 ` vc-git-log-incoming Dan Nicolaescu
2010-06-02 10:38 ` vc-git-log-incoming Miles Bader
2010-06-03 23:41 ` vc-git-log-incoming Dan Nicolaescu
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.