diff options
author | Christian Couder <christian.couder@gmail.com> | 2017-03-30 23:03:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-20 20:57:26 -0700 |
commit | ccef2bb5fa752fac9351cabc61c1362c85d620ee (patch) | |
tree | 95d13e2925bbfd51853785eda11193b72d83e95f /builtin/mktag.c | |
parent | Documentation/git-update-index: explain splitIndex.* (diff) | |
download | tgif-ccef2bb5fa752fac9351cabc61c1362c85d620ee.tar.xz |
read-cache: avoid using git_path() in freshen_shared_index()
When performing an interactive rebase in split-index mode,
the commit message that one should rework when squashing commits
can contain some garbage instead of the usual concatenation of
both of the commit messages.
The code uses git_path() to compute the shared index filename, and
passes it to check_and_freshen_file() as its argument; there is no
guarantee that the rotating pathname buffer passed as argument will
stay valid during the life of this call. Make our own copy before
calling the function and pass the copy as its argument to avoid this
risky pattern.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mktag.c')
0 files changed, 0 insertions, 0 deletions