Added capability to get all commits or do not limit them by giving -1 as limit