907e51f53079e8d77ae026b7f6dc2e1f25b43608
galt
  Tue Mar 2 03:57:16 2010 -0800
adding userHash and users list
diff --git git-reports.c git-reports.c
index 89c2061..f55fcc3 100644
--- git-reports.c
+++ git-reports.c
@@ -9,7 +9,9 @@
 
 static char const rcsid[] = "$Id: git-reports.c,v 1.1 2010/03/02 08:43:07 galt Exp $";
 
-//struct hash *cidHash = NULL;
+
+struct hash *userHash = NULL;
+struct slName *users = NULL;
 
 char *startTag = NULL;
 char *endTag = NULL;
@@ -134,12 +136,13 @@
 	    f->path = cloneString(line);
 	    slAddHead(&files, f);
 	    }
+	slReverse(&files);
 	}
 
-
     commit->files = files;
 
     slAddHead(&commits, commit);
+    slReverse(&commits);
     }
 lineFileClose(&lf);
 
@@ -152,7 +155,21 @@
 void gitReports()
 /* generate code-review reports from git repo */
 {
-struct commit *commits = getCommits();
+/* read the commits */
+struct commit *commits = getCommits(), *c = NULL;
+/* make the user list */
+for(c = commits; c; c = c->next)
+    {
+    
+    if (!hashLookup(userHash, c->author))
+	{
+	hashStore(userHash, c->author);
+	struct slName *name = newSlName(c->author);
+	slAddHead(&users, name);
+	}
+    }
+slReverse(&users);
+
 }
 
 int main(int argc, char *argv[])
@@ -173,12 +190,11 @@
 repoDir = argv[6];
 outDir = argv[7];
 
-gitReports();
-
-//cidHash = hashNew(5);
+userHash = hashNew(5);
 
+gitReports();
 
-//hashFree(&cidHash);
+hashFree(&userHash);
 printf("Done.\n");
 return 0;
 }