Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-12-27 13:18:39 +0300
committerJunio C Hamano <gitster@pobox.com>2017-12-27 23:38:35 +0300
commit176ea747930908669200520ae14f9dbc61cf0d40 (patch)
tree38244c873d3d4a9beba07b42d64511853258f750 /wt-status.h
parent5134ccde642ae9ed6a244c92864c26734d100f4c (diff)
wt-status.c: handle worktree renames
Before 425a28e0a4 (diff-lib: allow ita entries treated as "not yet exist in index" - 2016-10-24) there are never "new files" in the index, which essentially disables rename detection because we only detect renames when a new file appears in a diff pair. After that commit, an i-t-a entry can appear as a new file in "git diff-files". But the diff callback function in wt-status.c does not handle this case and produces incorrect status output. PS. The reader may notice that this patch adds a new xstrdup() but not a free(). Yes we leak memory (the same for head_path). But wt_status so far has been short lived, this leak should not matter in practice. Noticed-by: Alex Vandiver <alexmv@dropbox.com> Helped-by: Igor Djordjevic <igor.d.djordjevic@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.h')
0 files changed, 0 insertions, 0 deletions