From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: Comments on recursive merge..
Date: Fri, 11 Nov 2005 14:25:49 -0800 [thread overview]
Message-ID: <7v4q6ilt3m.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0511071629270.3247@g5.osdl.org> (Linus Torvalds's message of "Mon, 7 Nov 2005 16:33:56 -0800 (PST)")
Linus Torvalds <torvalds@osdl.org> writes:
>> Another thing to consider is if it is fast enough for everyday
>> trivial merges.
>
> Hmm. True. The _really_ trivial in-index case triggers for me pretty
> often, but I haven't done any statistics. It might be only 50% of the
> time.
Just for fun, I randomly picked two heads/master commits from
linux-2.6 repository (one was when I happened to have pulled the
last time, and the other was when I thought this might be an
interesting exercise and pulled again), and fed the commits
between the two to a little script that looks at commits and
tries to stat what they did (the script ignores renames so they
appear as deletes and adds).
Here is what the script spitted out:
Total commit objects: 3957
Trivial Merges: 72 (1.82%)
Merges: 225 (5.69%)
Number of paths touched by non-merge commits:
average 4.50, median 2, min 2, max 199
Number of merge parents:
average 2.00, median 2, min 2, max 2
Number of merge bases:
average 1.00, median 1, min 1, max 1
File level merges:
average 37.61, median 8, min 0, max 555
Number of changed paths from the first parent:
average 379.09, median 66, min 1, max 7553
File level 3-ways:
average 1.96, median 1, min 0, max 37
Paths deleted:
average 47.56, median 15, min 0, max 554
This counts what happened in individual devleoper's trees,
subsystem maintainer trees and your tree, not just what you saw
yourself.
Some observations.
- Trivial Merges count is surprisingly high. About 1/3 of
merges are pure in-index merges.
- Most of the commits (developer commits, not merges) are
small and touches only a couple of paths.
- Nobody does octopus ;-).
- We did not have multi-base merge case during the period
looked at (but the sample count is very low).
- merge-one-file was called for only a handful (median 8)
files, which is negligibly small compared to the total 17K
files in the kernel tree, and fairly small compared to the
number of changed paths from the first parent (meaning,
read-tree trivial collapsing helped majorly). Among them,
the number of paths that needed real file-level 3-way merges
were even smaller (avg 1.96).
All three of these points together is a fine demonstration
that you designed git really right.
The samples were between these two commits:
commit 6693e74a16ef563960764bd963f1048392135c3c
Author: Linus Torvalds <torvalds@g5.osdl.org>
Date: Tue Oct 25 20:40:09 2005 -0700
commit 388f7ef720a982f49925e7b4e96f216f208f8c03
Author: Linus Torvalds <torvalds@g5.osdl.org>
Date: Fri Nov 11 09:26:39 2005 -0800
next prev parent reply other threads:[~2005-11-11 22:25 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-07 16:48 Comments on recursive merge Linus Torvalds
2005-11-07 16:56 ` Linus Torvalds
2005-11-07 23:19 ` [PATCH] merge-recursive: Only print relevant rename messages Fredrik Kuivinen
2005-11-07 23:54 ` Junio C Hamano
2005-11-09 10:36 ` Fredrik Kuivinen
2005-11-07 22:58 ` Comments on recursive merge Fredrik Kuivinen
2005-11-08 0:13 ` Junio C Hamano
2005-11-08 0:33 ` Linus Torvalds
2005-11-08 0:59 ` Junio C Hamano
2005-11-08 11:58 ` Johannes Schindelin
2005-11-08 21:02 ` Fredrik Kuivinen
2005-11-08 21:47 ` Junio C Hamano
2005-11-08 21:52 ` Linus Torvalds
2005-11-08 22:36 ` Fredrik Kuivinen
2005-11-08 23:05 ` Linus Torvalds
2005-11-08 23:18 ` Johannes Schindelin
2005-11-09 0:18 ` Linus Torvalds
2005-11-09 6:10 ` Junio C Hamano
2005-11-09 0:32 ` Petr Baudis
2005-11-09 0:51 ` Linus Torvalds
2005-11-09 0:59 ` Junio C Hamano
2005-11-09 1:22 ` Linus Torvalds
2005-11-09 1:42 ` Junio C Hamano
2005-11-09 10:20 ` Junio C Hamano
2005-11-09 14:59 ` Petr Baudis
2005-11-09 16:30 ` Linus Torvalds
2005-11-09 20:13 ` Junio C Hamano
2005-11-09 21:58 ` Linus Torvalds
2005-11-09 22:56 ` Junio C Hamano
2005-11-09 23:34 ` Linus Torvalds
2005-11-11 2:58 ` merge-base: fully contaminate the well Junio C Hamano
2005-11-11 5:36 ` Linus Torvalds
2005-11-11 6:04 ` Junio C Hamano
2005-11-11 16:18 ` Linus Torvalds
2005-11-11 8:28 ` Junio C Hamano
2005-11-08 23:04 ` Comments on recursive merge Johannes Schindelin
2005-11-08 16:21 ` [RFC/PATCH] Make git-recursive the default strategy for git-pull Junio C Hamano
2005-11-11 22:25 ` Junio C Hamano [this message]
2005-11-11 22:53 ` Comments on recursive merge Linus Torvalds
2005-11-12 0:42 ` Junio C Hamano
2005-11-12 6:35 ` Ryan Anderson
2005-11-12 7:44 ` [PATCH] GIT commit statistics Junio C Hamano
2005-11-12 12:19 ` Martin Langhoff
2005-11-12 12:53 ` Petr Baudis
2005-11-15 10:04 ` Catalin Marinas
2005-11-15 15:29 ` Chuck Lever
2005-11-12 19:04 ` Johannes Schindelin
2005-11-13 10:59 ` Junio C Hamano
2005-11-13 20:42 ` Martin Langhoff
2005-11-14 3:33 ` Junio C Hamano
2005-11-14 4:01 ` Martin Langhoff
2005-11-14 6:06 ` Junio C Hamano
2005-11-14 8:51 ` Martin Langhoff
2005-11-14 9:25 ` Petr Baudis
2005-11-14 21:25 ` Martin Langhoff
2005-11-14 9:27 ` Junio C Hamano
2005-11-15 3:00 ` Junio C Hamano
2005-11-13 11:11 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4q6ilt3m.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).