summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@mns.spb.ru>2014-01-20 16:20:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-24 22:44:57 (GMT)
commitaf82c7880f1a3df1655092da11c80603260384a0 (patch)
treed2149c13b42648b9698ab96df91fc85632c91342 /diff-lib.c
parent8518ff8fabc43aa96f1d8c8cd3de7f399d51d11e (diff)
downloadgit-af82c7880f1a3df1655092da11c80603260384a0.zip
git-af82c7880f1a3df1655092da11c80603260384a0.tar.gz
git-af82c7880f1a3df1655092da11c80603260384a0.tar.bz2
combine-diff: combine_diff_path.len is not needed anymore
The field was used in order to speed-up name comparison and also to mark removed paths by setting it to 0. Because the updated code does significantly less strcmp and also just removes paths from the list and free right after we know a path will not be needed, it is not needed anymore. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 346cac6..bf624e7 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -124,7 +124,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
dpath->path = (char *) &(dpath->parent[5]);
dpath->next = NULL;
- dpath->len = path_len;
memcpy(dpath->path, ce->name, path_len);
dpath->path[path_len] = '\0';
hashclr(dpath->sha1);
@@ -326,7 +325,6 @@ static int show_modified(struct rev_info *revs,
p = xmalloc(combine_diff_path_size(2, pathlen));
p->path = (char *) &p->parent[2];
p->next = NULL;
- p->len = pathlen;
memcpy(p->path, new->name, pathlen);
p->path[pathlen] = 0;
p->mode = mode;