From 87fb678ee84a03a70fc230a0bb18bc4314a9fb7a Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Fri, 20 Jun 2008 23:31:15 +0200 Subject: [PATCH] gitstats: Described a more complex tree in metrics.txt For better testing, the tree needs to be a bit more complex, so that more interesting patterns can be examined. This commit updates the documentation to describe this more complex tree, a future commit will make the setupRepo script follow this description. --- doc/metrics.txt | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/doc/metrics.txt b/doc/metrics.txt index a3d6ebb..ce4d958 100644 --- a/doc/metrics.txt +++ b/doc/metrics.txt @@ -19,30 +19,37 @@ The following metrics will be used to determine if something is a fix: We want to create a test repository with a structure similar to what is depicted below. - o-o-o-1-o-o-o-o-..-o-A - \ / - o-2-o-o-4-o-o-..-o-B - \ / - 3-o + o-o-o-1-o-o-o-o-o-o-o-o-5-o-o-o-A + \ / \ / + o-2-o-o-4-o-o-o-o-o-o-7-o-o-B + \ / \ / + 3-o o-6-o-o-o-8-o-C Main points of interest are the numbered commits. This repository will serve as testing ground for the 'belongs to a branch' metric. - It is evident that commit 1 belongs to branch A, since - there is no other branch head that contains it. - Branch 2 however, could be seen as belonging to either - branch A, or branch B, since both heads contain it. - It should belong 'most' to branch B, since that is the + 1. It is evident this commit 1 belongs to branch A, since + that is the branch it was made on. + 2. Could be seen as belonging to either branch A, B or C, + since all of those branches contain it. However, it + should belong 'most' to branch B, since that is the branch it was made on, whereas it was 'only' merged into - branch A. - Commit 3 on the other hand, clearly belongs 'most' to - branch B, since it is the only branch it is on, while it - was 'only' merged into branch B just as much as commit 2 - was 'only' merged into branch A. The distinction here is - that commit 3 occurs on no other branch than B. - Commit 4 is a merge commit, it merges commit 3 into - branch B and is only of interest because merge commits - might need extra attention. + branch A and C. + 3. Belongs 'most' to branch B, since the branch it got + made on was merged into B and then got deleted. Whereas + branch A and C got it through a merge. + 4. A merge commit, it merges commit 3 into branch B and + is only of interest because merge commits might need + extra attention. + 5. Belongs to branch A since it is the only branch it + exists on, but does occur before a merge with branch + B, this should not change it's dilution though. + 6. Contained in all branches, but should belong most to + branch C, then to B, and only lastly to branch A. + 7. Interesting because it is a merged commit, belongs to + branch B, although branch A also contains it. + 8. A single commit on branch C, should obviously only + belong to branch C with no dilution. * If the commit message matches a certain regexp. -- 2.11.4.GIT