Skip to content

fix/cleanup-lfs #228

@bwalsh

Description

@bwalsh

6) Deprecation Candidates

These are candidates for cleanup/refactor, based on current behavior and code layout.

6.1 Outdated / legacy LFS-oriented paths

  • cmd/fetch/main.go still shells out to git lfs pull directly. This is a legacy-style path compared with the managed DRS pull path in cmd/pull/main.go.
  • cmd/pull/main.go long help string says "git pull, git lfs pull, git lfs checkout", but implementation now uses DRS checksum lookup + direct download + git lfs checkout fallback. The wording is partially stale.

Candidate action:

  • Decide whether git drs fetch should be kept as an explicit LFS compatibility command, or deprecated in favor of git drs pull + git drs query workflows.
  • Update command docs/help text to avoid implying git lfs pull is always used in git drs pull.

6.2 Duplicated logic

  • Download option constants are duplicated:
    • internal/drsremote/remote.go (DownloadResolvedToPath via downloadResolved)
    • cmd/download/main.go (same MultipartThreshold, Concurrency, ChunkSize values).
  • Branch/ref parsing logic is duplicated in cmd/prepush/main.go:
    • readPushedRefs(...) + branchesFromRefs(...)
    • readPushedBranches(...) (older equivalent helper)

Candidate action:

  • Centralize transfer defaults into one constant/config source.
  • Keep one branch parsing path in pre-push and remove the duplicate helper after test updates.

6.3 Low-value / effectively unused runtime code paths

  • readPushedBranches(...) in cmd/prepush/main.go is not used by production pre-push flow (the flow uses readPushedRefs + branchesFromRefs), and appears retained mainly for tests (cmd/prepush/main_test.go).

Candidate action:

  • Replace test usage with readPushedRefs + branchesFromRefs, then remove readPushedBranches.

6.4 Documentation-level deprecation candidates

  • Any docs that describe git drs fetch as metadata-only should be revalidated against implementation (cmd/fetch/main.go currently performs git lfs pull).
  • Any docs that describe git drs pull as an unconditional "git lfs pull" wrapper should be updated to reflect the DRS-driven download path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions