trim_last_path_component(): replace last_path_elm()
commit0c0d6e8601a1cfb8ebbdadb6a25a9f6fadc91359
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 1 Oct 2014 10:28:35 +0000 (1 12:28 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Oct 2014 20:51:30 +0000 (1 13:51 -0700)
treeb2d942b9b59fa6eed5f6b7a1cba0c0f7b2e05596
parent6cad805332e3c3a60993f062afd8d896920689ab
trim_last_path_component(): replace last_path_elm()

Rewrite last_path_elm() to take a strbuf parameter and to trim off the
last path name element in place rather than returning a pointer to the
beginning of the last path name element. This simplifies the function
a bit and makes it integrate better with its caller, which is now also
strbuf-based. Rename the function accordingly and a bit less tersely.

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