]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/ls-files.c
ls-files: use correct format string
authorThomas Gummerer <t.gummerer@gmail.com>
Sun, 7 Apr 2019 18:47:51 +0000 (19:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Apr 2019 08:01:52 +0000 (17:01 +0900)
commit7cb7283adb817dff660d237fcba9cce9db594034
tree9b457965123ee76807e8d2b7c5095ee8b3f77b71
parentaeb582a98374c094361cba1bd756dc6307432c42
ls-files: use correct format string

struct stat_data and struct cache_time both use unsigned ints for all
their members.  However the format string for 'git ls-files --debug'
currently uses %d for formatting these numbers.  This means that we
potentially print these values incorrectly if they are greater than
INT_MAX.

This has been the case since the --debug option was introduced in 'git
ls-files' in 8497421715 ("ls-files: learn a debugging dump format",
2010-07-31).

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-files.c