Thread (1 message) 1 message, 1 author, 2022-11-21

Re: [PATCH] prune: quiet ENOENT on missing directories

From: Junio C Hamano <hidden>
Date: 2022-11-21 13:08:51

Eric Wong [off-list ref] writes:
quoted hunk
Good question, perhaps this could be a followup:
diff --git a/builtin/prune.c b/builtin/prune.c
index 2719220108..041c45ecbe 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -188,7 +188,6 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
 				      prune_cruft, prune_subdir, &revs);
 
 	prune_packed_objects(show_only ? PRUNE_PACKED_DRY_RUN : 0);
-	remove_temporary_files(get_object_directory());
 	s = mkpathdup("%s/pack", get_object_directory());
 	remove_temporary_files(s);
 	free(s);
I actually was hinting at making the remove_temporary_files()
recurse, so that you do not need the separate invocation in pack/
subdirectory.

Or make 256 calls for each of the fan-out subdirectory, in which
case the ENOENT silencing you did would really matter and shine.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help