]> git.ipfire.org Git - thirdparty/git.git/commit - diffcore.h
diffcore-rename, merge-ort: add wrapper functions for filepair alloc/dealloc
authorElijah Newren <newren@gmail.com>
Fri, 30 Jul 2021 11:47:41 +0000 (11:47 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Jul 2021 16:01:19 +0000 (09:01 -0700)
commita8791ef6492bf702ba70352009cbd28fb581c6e2
tree069fb2c73de4a9df8c8f0b973169e60f151ccab3
parent6697ee01b5d31df5c83ace9eabb6285cf42ff172
diffcore-rename, merge-ort: add wrapper functions for filepair alloc/dealloc

We want to be able to allocate filespecs and filepairs using a mem_pool.
However, filespec data will still remain outside the pool (perhaps in
the future we could plumb the pool through the various diff APIs to
allocate the filespec data too, but for now we are limiting the scope).
Add some extra functions to allocate these appropriately based on the
non-NULL-ness of opt->priv->pool, as well as some extra functions to
handle correctly deallocating the relevant parts of them.  A future
commit will make use of these new functions.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-rename.c
diffcore.h
merge-ort.c