#606·gitingest

(bug): -b/--branch and /tree/<branch> URLs still ingest the default branch (follow-up to #574)

Author: sudoping01Created Sep 21, 2026Updated Sep 21, 2026

Follow-up to #574, which was closed by the stale bot but never fixed.

The branch is never passed to git clone. All three clone paths in src/gitingest/clone.py (partial clone, authenticated GitHub, and git.Repo.clone_from) use --single-branch --depth=1 without --branch, so only the default branch is downloaded. The later fetch of the resolved commit fails without an error, and the output contains the default branch. This affects both -b/--branch in the CLI and /tree/<branch> URLs in the web UI.

#575 by @yoonsoo-park fixes this by passing -b <branch|tag> to every clone path, but it was also closed by the stale bot without a review. @yoonsoo-park, would you mind reopening #574 and #575? I'm happy to help rebase it or add tests if that's useful.