googlearchive/git-rv

Does not support commit messages that exceed 100 characters

Opened this issue · 3 comments

During export, if a commit message exceeds 100 characters, git-rv bails with an error. Assuming the restriction can't be overcome or extended, a cleaner error message (maybe with hints on how to edit the commit message: git rebase --interactive?) would be more appropriate.

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "main.py", line 28, in
File "main.py", line 23, in main
File "export.py", line 218, in callback
File "export.py", line 113, in init
File "export.py", line 168, in __get_commit_message_parts
File "utils.py", line 456, in get_user_commit_message_parts
File "utils.py", line 341, in get_commit_message_parts
utils.GitRvException: Commit subject '...' exceeds 100 characters.

I totally agree. There is a good reason for it, services like Google Project Hosting and GitHub truncate after 100 characters in the display and the commit message has a unicode ellipsis as the 100th character with the first 99 preserved.

It seems super simple to fix at:
https://github.com/GoogleCloudPlatform/git-rv/blob/c9e7c9b671e1d81a4ba6a77fb17c858ffbea9fd1/utils.py#L340

Care to give it a try?

So you'd prefer to maintain the limit and improve the error message? I'll be happy to take a look.

Exactly.