Question: Is fetch-depth: 100 sufficient or should we use fetch-depth: 0 (full history)? #230

Closed
opened 2026-05-24 19:03:32 +00:00 by guettlibot · 1 comment
guettlibot commented 2026-05-24 19:03:32 +00:00 (Migrated from codeberg.org)

Context (from #228)

The fix for issue #228 changes fetch-depth from 1 to 100 in the deploy-playstore CI job so that generate-changelog can produce a 50-entry log. The repo currently has 707 commits.

Question

Is fetch-depth: 100 a good long-term choice, or should we use fetch-depth: 0 (full history)?

Tradeoffs

  • fetch-depth: 100 is sufficient for git log -n 50 with headroom, and adds minimal checkout overhead now
  • As the repo grows, 100 commits of history will always cover the 50-entry changelog window
  • fetch-depth: 0 fetches all 707+ commits (and growing), which is slower but guarantees correctness
  • If the changelog window (git log -n 50) is ever increased, fetch-depth: 100 would need updating too
## Context (from #228) The fix for issue #228 changes fetch-depth from 1 to 100 in the deploy-playstore CI job so that generate-changelog can produce a 50-entry log. The repo currently has 707 commits. ## Question Is fetch-depth: 100 a good long-term choice, or should we use fetch-depth: 0 (full history)? ## Tradeoffs - fetch-depth: 100 is sufficient for git log -n 50 with headroom, and adds minimal checkout overhead now - As the repo grows, 100 commits of history will always cover the 50-entry changelog window - fetch-depth: 0 fetches all 707+ commits (and growing), which is slower but guarantees correctness - If the changelog window (git log -n 50) is ever increased, fetch-depth: 100 would need updating too
guettlibot commented 2026-05-25 12:43:23 +00:00 (Migrated from codeberg.org)

Answer: keep fetch-depth: 100.

100 covers the 50-entry changelog window with 2× headroom. The marginal correctness gain from fetching all 700+ (and growing) commits doesn't justify the extra checkout time. The only scenario that would break is increasing the changelog window beyond 100 entries, but that would be a deliberate change that can update the fetch-depth at the same time. Closing as answered.

**Answer: keep fetch-depth: 100.** 100 covers the 50-entry changelog window with 2× headroom. The marginal correctness gain from fetching all 700+ (and growing) commits doesn't justify the extra checkout time. The only scenario that would break is increasing the changelog window beyond 100 entries, but that would be a deliberate change that can update the fetch-depth at the same time. Closing as answered.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#230