builtin/branch: strip refs/heads/ using skip_prefix
commit255073ca59de7cd293e4a9d6c12831b6e505c37e
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>
Fri, 1 Dec 2017 05:59:33 +0000 (1 11:29 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Dec 2017 23:06:46 +0000 (7 15:06 -0800)
tree5ec00e5c15979825d0e878e1f0a765defc257d2d
parenta48ebe9724b01e53f23e2a44a85f52237aaf5c34
builtin/branch: strip refs/heads/ using skip_prefix

Instead of hard-coding the offset strlen("refs/heads/") to skip
the prefix "refs/heads/" use the skip_prefix() function which
is more communicative and verifies that the string actually
starts with that prefix.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c