added the option to override the number of lines before commit.
a