From 3be5b358eb88923cbf6fd21dfa4df461ea1a8e7b Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Wed, 18 Jun 2008 23:59:32 +0200 Subject: [PATCH] gitstats: Added a little more documentation on the branch metric Included a ASCII visualization of the tree structure we are interested in. --- doc/metrics.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/metrics.txt b/doc/metrics.txt index c7ab3fa..de24f5b 100644 --- a/doc/metrics.txt +++ b/doc/metrics.txt @@ -15,6 +15,34 @@ The following metrics will be used to determine if something is a fix: branch only because it got merged in, that is a strong dilation. If another branch is merged in that is only a slight dilation (or perhaps none at all). + + 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-4-o-o-..-o-B + \ / + 3 + + 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 + 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. * If the commit message matches a certain regexp. -- 2.11.4.GIT