]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
resolve_gitlink_ref(): avoid memory allocation in many cases
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 4 Sep 2016 16:08:23 +0000 (18:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2016 22:28:13 +0000 (15:28 -0700)
commit48a8475fd3f935d753cc2e0dd81562bc73f6d6d3
tree378c216572c8fee7fb2e371a3e039aa9d1de963a
parent424dcc7683a37d1f14aa0dd485300001cb854f6c
resolve_gitlink_ref(): avoid memory allocation in many cases

If we don't have to strip trailing '/' from the submodule path, then
don't allocate and copy the submodule name.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c