builtin/commit.c: memoize git-path for COMMIT_EDITMSG
commite51b0dfc978649b9f0e3a594030810cc472a8b08
authorPranit Bauva <pranit.bauva@gmail.com>
Tue, 24 May 2016 19:19:50 +0000 (25 00:49 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Jun 2016 17:03:10 +0000 (9 10:03 -0700)
treee62c9e91ae6fa9bfed42b9bd49e397927eb9fe30
parent49fa3dc76179e04b0833542fa52d0f287a4955ac
builtin/commit.c: memoize git-path for COMMIT_EDITMSG

This is a follow up commit for f932729c (memoize common git-path
"constant" files, 10-Aug-2015).

The many function calls to git_path() are replaced by
git_path_commit_editmsg() and which thus eliminates the need to repeatedly
compute the location of "COMMIT_EDITMSG".

Mentored-by: Lars Schneider <larsxschneider@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c