Remove dead job/migration/schedule functions#13
Merged
Conversation
get_job_config_file, validate_job_config, get_default_job and is_multi_job have no callers anywhere in the codebase or tests. Callers build job paths inline and validation/mode-detection are never invoked.
rollback_migration, show_migration_status and is_multi_job_enabled have no callers: no CLI subcommand routes to rollback or status, and auto-migration is one-way. Drops the now-orphaned "Migration Status" section header too.
get_template_display, get_template_description and detect_template_name have no callers. get_template_schedule and list_schedule_templates (used by the schedule CLI) are kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of a grouped dead-code cleanup (3 PRs, split by area). This PR removes zero-caller functions across the multi-job, migration, and schedule modules.
Changes (3 atomic commits)
lib/jobs.sh— removeget_job_config_file,validate_job_config,get_default_job,is_multi_joblib/migration.sh— removerollback_migration,show_migration_status,is_multi_job_enabled(no CLI routes to rollback/status; auto-migration is one-way)lib/schedule.sh— removeget_template_display,get_template_description,detect_template_name(keepsget_template_scheduleandlist_schedule_templates, which the schedule CLI uses)244 lines removed.
Scope note
Strictly behaviour-preserving: only functions with zero callers anywhere in the codebase or tests. The
suggest_alternative_timesconflict-suggestion feature and the job reserved-name list are reachable (wired intocheck_schedule_conflicts/validate_job_name), so they are intentionally left for a separate behaviour-change review, not included here.Testing
./tests/run-tests.sh --syntax— 22 files pass./tests/run-tests.sh --unit— all unit tests passshellcheck -x -s bash -S warning backupd.sh lib/*.sh— cleanTargets
develop. Hold for green CI + review before merge.