summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKjetil Barvik <barvik@broadpark.no>2009-03-04 18:47:39 +0100
committerJunio C Hamano <gitster@pobox.com>2009-03-04 20:36:24 -0800
commit19de5d6913b9681d2bde533bccc8445c9236a648 (patch)
tree9f060a243b359646f9394cfff03776e4399cf86b /remote.c
parenta95148dea1d9546e96adef7c3cad11be80aa30f5 (diff)
downloadgit-19de5d6913b9681d2bde533bccc8445c9236a648.tar.gz
stat_tracking_info(): only count real commits
stat_tracking_info() in remote.c is used to collect the statistics to be able to say (for instance) from the output of "git checkout': Your branch and 'foo' have diverged, and have X and Y different commit(s) each, respectively. Currently X and Y also includes the count of merges. This patch excludes the merges from being counted. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index d7079c6dd8..06c414e118 100644
--- a/remote.c
+++ b/remote.c
@@ -1310,9 +1310,10 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs)
if (theirs == ours)
return 0;
- /* Run "rev-list --left-right ours...theirs" internally... */
+ /* Run "rev-list --no-merges --left-right ours...theirs" internally... */
rev_argc = 0;
rev_argv[rev_argc++] = NULL;
+ rev_argv[rev_argc++] = "--no-merges";
rev_argv[rev_argc++] = "--left-right";
rev_argv[rev_argc++] = symmetric;
rev_argv[rev_argc++] = "--";