f67a1a71877a6bee2aba794b03ea281796e1b442
galt
  Wed Mar 3 17:37:40 2010 -0800
adding commitNumber for fileview sorting
diff --git git-reports.c git-reports.c
index 07e56ee..6eb52c3 100644
--- git-reports.c
+++ git-reports.c
@@ -37,6 +37,7 @@
 struct commit 
     {
     struct commit *next;
+    int commitNumber;    // used for sorting fileviews
     char *commitId;
     char *author;
     char *date;
@@ -74,6 +75,7 @@
 struct commit* getCommits()
 /* get all commits from startTag to endTag */
 {
+int numCommits = 0;
 safef(gitCmd,sizeof(gitCmd), ""
 "git log origin/%s..origin/%s --name-status > commits.tmp"
 , startTag, endTag);
@@ -93,6 +95,7 @@
     if (!sameString("commit", w))
 	errAbort("expected keyword commit parsing commits.tmp\n");
     commit->commitId = cloneString(nextWord(&line));
+    commit->commitNumber = ++numCommits;
 
     lineFileNext(lf, &line, &lineSize);
     w = nextWord(&line);