Quality refactor following a codebase-wide scan (follow-up to #212).
Changes
Dead API removal: public array_list_extend -> static; legacy 16-param parallel_scanner_create deleted (test migrated to parallel_scanner_create_with_options)
- parallel_scanner_init(): result queue + sync primitive setup with unwinding
- batch_files(): root-file chunk batching, reusable by other scan paths
- scan_root_directory()/scan_root_entry(): root-dir scanning
- spawn_parallel_workers(): worker thread creation with per-thread arg setup
Main function reduced from ~230 to ~40 lines
- file.c: File/FileMetadata lifecycle and local disk helpers (~110 lines)
- file_send.c: client-side send path (file_send_single_calls, file_send_sendfile)
- file_receive.c: server-side receive/save path (file_receive, receive_incremental_check,
receive_manifest, file_save_to_disk)
- file_types.h holds shared struct definitions; file.h remains an umbrella header
so existing includes are unaffected
Completes the transfer/protocol separation started in PR #212
- Extract print_transfer_progress() shared by single-threaded loop and
the multithreaded progress thread
- Route all send_files() exits through a single send_fail cleanup path
- Fix pre-existing manifest leak on success without --delete
- Add log_perror() helper (context + strerror(errno)) to the log module
- Replace all bare perror() calls with log_perror() so errors are routed
through the unified logger (stderr sink + optional --log-file sink)
- Convert fprintf(stderr, "Error:/Warning: ...") in client code to
log_message(); raw fprintf kept only for progress/stats output
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Quality refactor following a codebase-wide scan (follow-up to #212).
Changes
array_list_extend-> static; legacy 16-paramparallel_scanner_createdeleted (test migrated toparallel_scanner_create_with_options)to_disk->file_write_to_disk,is_remote_dest->config_is_remote_destOPTION_TABLE+offsetofdispatch); extractedparse_ull_arg()(replaces 5 duplicated strtoull blocks) andconfig_add_pattern()parallel_scanner_create_with_optionssplit intoparallel_scanner_init,batch_files,scan_root_directory,spawn_parallel_workers(232 -> ~40 lines)file.c+file_send.c(client send) +file_receive.c(server receive/save/manifest); newfile_types.h/file_send.h/file_receive.h,file.hremains umbrella headerprint_transfer_progress()for ST/MT paths; single cleanup exit path; fixes manifest leak on success without --deletelog_perror(); all bareperror()and clientfprintf(stderr, "Error:...")converted to the log module (routed to --log-file too)perrorcalls; clang-format 18 appliedVerification