javagit/src/main/java/edu/nyu/cs/javagit/api/commands/GitLogResponse.java
public void addCommit(){
		if(this.sha!=null){
			Commit commit = new Commit(this.sha, this.mergeDetails, this.author, this.dateString,
					this.message, this.files);
			if (commitList == null){
				commitList = new ArrayList<Commit>();
			}

			this.commitList.add(commit);
			//reset variables for future commits.
			this.files = null;
			this.mergeDetails = null;
			this.message = null;
		}
	}
public void addCommit(){
		if(this.sha!=null){
			Commit commit = new Commit(this.sha, this.mergeDetails, this.author, this.dateString,
					this.message, this.files);
			if (commitList == null){
				commitList = new ArrayList<Commit>();
			}

			this.commitList.add(commit);
			//reset variables for future commits.
			this.files = null;
			this.mergeDetails = null;
			this.message = null;
		}
	}
This add a newly created commit object to the list of commits for a log.