Re: potential improvement to 'git log' with a range

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: potential improvement to 'git log' with a range

From: Martin Geisler <hidden>
Date: 2016-06-15 22:48:59

Jakub Narebski [off-list ref] writes:
Linus Torvalds [off-list ref] writes:
quoted
On Fri, 9 Apr 2010, Aghiles wrote:
quoted
Oh, I should have read the documentation. I was certain that ".."
stands for a range but it is a ... complement.
Well, technically ".." means two different things

 - for "set operations" (ie "git log" and friends) it's the "relative
   complement" of two sets (or "'reachable from A' \ 'reachable from B'").

 - for "edge operations" (ie "git diff" and friends) it's just two
   end-points (aka "range"). A diff doesn't work on sets, it only
   works on the two endpoints.
[...]
quoted
Most SCM's really talk about "ranges". Once you think in those terms,
complex history doesn't work. Git very fundamentally is much about
set theory, and "ranges" is a bad word to use.
For example from I have got from asking on #mercurial IRC channel on
FreeNode (a bit of self promotion: I have done this research to write
an answer to "Git and Mercurial - Compare and Contrast" question on
StackOverflow[1]), Mercurial implements its ".." equivalent in the
term of _numeric range_, even for "hg log" (sic!).
This is fixed with Mercurial 1.6: we now have a query language where
'X..Y' (or 'X::Y') is understood as the set of changesets that are both
descendents of X and ancestors of Y.
[1]
http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/

Re: potential improvement to 'git log' with a range

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:48:59

On Wed, 23 Jun 2010, Martin Geisler wrote:
Jakub Narebski [off-list ref] writes:
quoted
Linus Torvalds [off-list ref] writes:
quoted
Well, technically ".." means two different things

 - for "set operations" (ie "git log" and friends) it's the "relative
   complement" of two sets (or "'reachable from A' \ 'reachable from B'").

 - for "edge operations" (ie "git diff" and friends) it's just two
   end-points (aka "range"). A diff doesn't work on sets, it only
   works on the two endpoints.
[...]
quoted
Most SCM's really talk about "ranges". Once you think in those terms,
complex history doesn't work. Git very fundamentally is much about
set theory, and "ranges" is a bad word to use.
For example from I have got from asking on #mercurial IRC channel on
FreeNode (a bit of self promotion: I have done this research to write
an answer to "Git and Mercurial - Compare and Contrast" question on
StackOverflow[1]), Mercurial implements its ".." equivalent in the
term of _numeric range_, even for "hg log" (sic!).
This is fixed with Mercurial 1.6: we now have a query language where
'X..Y' (or 'X::Y') is understood as the set of changesets that are both
descendents of X and ancestors of Y.
Thanks.  It looks like Mercurial's 'X::Y' is equivalent to Git's 
'--ancestry-path X..Y' (the --ancestry-path option is a new feature).
 
quoted
[1]
http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930
Fixed.  Could you please take a look if it is correct, and if there
are errors, either correct it yourself, or ask me to do it (either via
comments for this question, or via email)?  Thanks in advance.

P.S. Isn't mercurial-devel subscribe only?
-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help