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:
authorJeff King <peff@peff.net>2019-07-31 07:38:20 +0300
committerJunio C Hamano <gitster@pobox.com>2019-08-01 23:06:52 +0300
commitb3b3cbcbf246b1051ad453bc02e24a89573e2911 (patch)
tree3de6ade42d5a43eca2da12cd6053c57d0c4c66b5 /builtin/merge-tree.c
parent37806080d7be1ab5b2fa918f6a528652596ea2c1 (diff)
tree-walk: accept a raw length for traverse_path_len()
We take a "struct name_entry", but only care about the length of the path name. Let's just take that length directly, making it easier to use the function from callers that sometimes do not have a name_entry at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-tree.c')
-rw-r--r--builtin/merge-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index f0e4cfefaa..0629c87b19 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -180,7 +180,7 @@ static struct merge_list *create_entry(unsigned stage, unsigned mode, const stru
static char *traverse_path(const struct traverse_info *info, const struct name_entry *n)
{
- char *path = xmallocz(traverse_path_len(info, n));
+ char *path = xmallocz(traverse_path_len(info, tree_entry_len(n)));
return make_traverse_path(path, info, n->path, n->pathlen);
}