pack-write: simplify index_pack_lockfile using skip_prefix() and xstrfmt()
commitd773144417b1a87b4529144ab0530ecfea103754
authorRené Scharfe <l.s.r@web.de>
Sat, 30 Aug 2014 09:47:19 +0000 (30 11:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Sep 2014 17:37:24 +0000 (2 10:37 -0700)
tree5012713e0fadd1c24db5ecdef3fd30b6b26cacf8
parentbe0b3f822b6375028b25f62894056e63cb7c3ce4
pack-write: simplify index_pack_lockfile using skip_prefix() and xstrfmt()

Get rid of magic string length constants by using skip_prefix() instead
of memcmp() and use xstrfmt() for building a string instead of a
PATH_MAX-sized buffer, snprintf() and xstrdup().

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-write.c