[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-205-g7b38ef0
Service Account
noreply at mpich.org
Sat Jul 11 13:22:59 CDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 7b38ef031693eb89bd30f4e2e4658752ae73f9e6 (commit)
from cc6f9b7d56e6d94605651dfc9e51736374991b59 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7b38ef031693eb89bd30f4e2e4658752ae73f9e6
commit 7b38ef031693eb89bd30f4e2e4658752ae73f9e6
Author: Pavan Balaji <balaji at anl.gov>
Date: Sat Jul 11 13:04:53 2015 -0500
Added a script to detect git conflicts.
With the project including a large number of reference objects, our
current usage of 8 for the abbreviation length might not be always
sufficient. Currently, with this length, we have no conflicts and a
probability of collision at 1.96%.
diff --git a/maint/git-conflicts.bash b/maint/git-conflicts.bash
new file mode 100755
index 0000000..e61f0f9
--- /dev/null
+++ b/maint/git-conflicts.bash
@@ -0,0 +1,31 @@
+#! /bin/bash
+
+max_abbrev=12
+
+total=`git rev-list --all | wc -l`
+
+echo "Conflicts:"
+echo "Format: [abbrev length]: number of conflicts / total number of refs (percentage conflicts)"
+for ((x = 1 ; x <= ${max_abbrev} ; x++)) ; do
+ conflicts=`git rev-list --all --abbrev=$x --abbrev-commit | sort | uniq -D -w$x | wc -l`
+ percent=`echo "scale=8 ; 100 * $conflicts / $total" | bc | awk '{ printf("%1.2f\n", $0); }'`
+ echo " [$x]: $conflicts / $total ($percent %)"
+ if test "$conflicts" = "0" ; then break ; fi
+done
+
+##
+## probability calculation is based on this random link, that I found
+## online:
+## http://blog.cuviper.com/2013/11/10/how-short-can-git-abbreviate/
+##
+## I have not verified the accuracy of the calculation at that link,
+## but if it is online, it must be true, of course. ;-)
+##
+
+echo
+echo "Probability of Collision:"
+echo "Format: [abbrev length]: probability of collision"
+for ((; x <= ${max_abbrev} ; x++)) ; do
+ percent=`echo "scale=8 ; 100 * ($total ^ 2) / (16 ^ $x)" | bc | awk '{ printf("%1.2f\n", $0); }'`
+ echo " [$x]: $percent %"
+done
-----------------------------------------------------------------------
Summary of changes:
maint/git-conflicts.bash | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
create mode 100755 maint/git-conflicts.bash
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list