Actual behavior:
The branchPoint("unknown") returns null if the specified branch point does not exist (or is not found). Therefore, countCommitsSince(branchPoint("unknown")) may throw a NullPointerException because it currently does not check for null.
Expected behavior:
countCommitsSince should check if the incoming value of obj is null and return -1 if so.
I've provided a fix in Pull Request #4.
Actual behavior:
The
branchPoint("unknown")returnsnullif the specified branch point does not exist (or is not found). Therefore,countCommitsSince(branchPoint("unknown"))may throw aNullPointerExceptionbecause it currently does not check fornull.Expected behavior:
countCommitsSinceshould check if the incoming value ofobjisnulland return-1if so.I've provided a fix in Pull Request #4.