git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git vs hg commit counts?

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 27, 2009, 01:14 UTC
Message-ID
<m3zl7dd4g6.fsf@localhost.localdomain>
In-Reply-To
<1256602127.29938.8.camel@Joe-Laptop.home>
Joe Perches <joe@perches.com> writes:
Show 17 quoted lines
> I'm comparing linux-kernel git vs hg repositories.
> 
> While testing some changes to scripts/get_maintainer.pl,
> I noticed that git and hg have different commit counts
> for the same files.
> 
> For instance:
> 
> $ git log --since=1-year-ago -- MAINTAINERS | \
> 	grep -P "^commit [0-9a-f]{40,40}$"  | wc -l
> 514
> 
> $ hg log --template="commit {node}\n" --date -365 -- MAINTAINERS  | \
> 	grep -P "^commit [0-9a-f]{40,40}$" | wc -l
> 601
> 
> Anyone have any understanding why?

It *might* be caused by the fact that in Mercurial commit can have only up to two parents. This means that octopus merges (merge commits with more than two parents: there are a few of them in linux-kernel history) have to be represented as a set of two-parent merges.

-- 
Jakub Narebski

http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930
Previous: Joe Perches
Message 6 of 6 in “git vs hg commit counts?”
  1. Joe PerchesOct 27, 2009
  2. Junio C HamanoOct 27, 2009
  3. Joe PerchesOct 27, 2009
  4. Marti RaudseppOct 27, 2009
  5. Joe PerchesOct 27, 2009
  6. Jakub NarebskiOct 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.