summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2022-02-02 02:37:29 +0000
committerJunio C Hamano <gitster@pobox.com>2022-02-02 10:02:27 -0800
commit7b90ab467a658b2fb1b7c15c7d634e06f35f4ef2 (patch)
tree223e2be7ced848f782226bc6bd984f065f0cf546 /revision.h
parentdb757e8b8d5527c195c461a04ec35d141ddea48e (diff)
downloadgit-7b90ab467a658b2fb1b7c15c7d634e06f35f4ef2.tar.gz
log: clean unneeded objects during `log --remerge-diff`
The --remerge-diff option will need to create new blobs and trees representing the "automatic merge" state. If one is traversing a long project history, one can easily get hundreds of thousands of loose objects generated during `log --remerge-diff`. However, none of those loose objects are needed after we have completed our diff operation; they can be summarily deleted. Add a new helper function to tmp_objdir to discard all the contained objects, and call it after each merge is handled. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index 13178e6b8f..44efce3f41 100644
--- a/revision.h
+++ b/revision.h
@@ -318,6 +318,9 @@ struct rev_info {
/* misc. flags related to '--no-kept-objects' */
unsigned keep_pack_cache_flags;
+
+ /* Location where temporary objects for remerge-diff are written. */
+ struct tmp_objdir *remerge_objdir;
};
int ref_excluded(struct string_list *, const char *path);