revert: simplify getting commit subject in format_todo()
authorRamkumar Ramachandra <artagnon@gmail.com>
Wed, 14 Dec 2011 16:54:31 +0000 (22:24 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Dec 2011 21:16:52 +0000 (13:16 -0800)
commit9e1313648d4c0ee1bab0ee3d7ed22553bd5bf87c
tree019bc323b5844f3df5d3e90f2c8ed6b0ab591944
parent0db76962d156c196a23a98014c1585246f561a5d
revert: simplify getting commit subject in format_todo()

format_todo() calls get_message(), but uses only the subject line of
the commit message.  As a minor optimization, save work and
unnecessary memory allocations by using find_commit_subject() instead.
Also, remove the unnecessary check on cur->item->buffer: the
lookup_commit_reference() call in parse_insn_line() has already made
sure of this.

Suggested-by: Jonathan Nieder <jrnieder@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c