mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
db757e8b8d
commit
7b90ab467a
@@ -46,6 +46,12 @@ int tmp_objdir_migrate(struct tmp_objdir *);
|
||||
*/
|
||||
int tmp_objdir_destroy(struct tmp_objdir *);
|
||||
|
||||
/*
|
||||
* Remove all objects from the temporary object directory, while leaving it
|
||||
* around so more objects can be added.
|
||||
*/
|
||||
void tmp_objdir_discard_objects(struct tmp_objdir *);
|
||||
|
||||
/*
|
||||
* Add the temporary object directory as an alternate object store in the
|
||||
* current process.
|
||||
|
||||
Reference in New Issue
Block a user