GIT utilities -- repo summary, repl, changelog population, author commit percentages and more
by tjShell
Last 12 weeks · 9 commits
4 of 6 standards met
Summary only knew how to fetch GitLab-style merge requests (). Forgejo instances such as Codeberg publish pull requests under instead, so passing a Codeberg pull request URL (e.g. ) to tried to fetch the wrong ref and failed. This adds a second URL pattern for the shape used by Forgejo/Codeberg and switches the fetched ref accordingly, while leaving the existing GitLab URL and bare numeric id behavior unchanged. Changes : recognize URLs and fetch for them instead of . and : document the new URL format. : new test covering the existing numeric-id flow to guard against regressions. Test plan passes locally. reports no issues. Manually verified the fetch path against a local bare repo. Closes #1213
What (in , prepended to most commands at install time) used: to decide whether the current directory is inside a git repository. fails inside a bare repository because a bare repo has no working tree, so any command relying on this shared helper (e.g. ) reports even when run from inside a perfectly valid bare repository. Fix Switch to , which succeeds for both normal and bare repositories, while still failing (and printing ) outside of any repository. How I found / verified it This is exactly #1238, which already has a maintainer LGTM (spacewander, hyperupcall) on this precise fix, but no PR had been opened for it yet: In , replace with . succeeds for both normal and bare repositories, so this keeps existing behavior while fixing the bare-repo case. I reproduced it locally: prints and exits non-zero before the fix, and exits 0 after. Testing Added with three cases: succeeds inside a normal (non-bare) repo succeeds inside a bare repo (the regression case — fails without the fix) fails outside of a repo, with the message preserved Ran the full suite (bats 1.14.0) before and after the change; no new failures introduced (a handful of pre-existing failures in / tests are unrelated environment issues — missing /editor setup — present on as well). Closes #1238.
Hi maintainers — this report was automatically generated by OpenCode (model: gpt-5.3) acting on my behalf. currently rejects bare repositories because the repo check uses , which fails when no working tree exists. Reproduction 1. Enter a bare git repository directory (for example: ) 2. Run Current behavior exits with . Expected behavior Bare repositories should be accepted as valid git repositories. Proposed fix In , replace with . succeeds for both normal and bare repositories, so this keeps existing behavior while fixing the bare-repo case.
Repository: tj/git-extras. Description: GIT utilities -- repo summary, repl, changelog population, author commit percentages and more Stars: 18098, Forks: 1227. Primary language: Shell. Languages: Shell (91.5%), Python (4%), Batchfile (2.6%), Makefile (1.9%). License: MIT. Topics: git. Latest release: 7.5.0 (3mo ago). Open PRs: 9, open issues: 89. Last activity: 1w ago. Community health: 71%. Top contributors: spacewander, tj, hemanth, nicolaiskogheim, jweslley, hyperupcall, tfendin, Lee-W, qw3rtman, timfeirg and others.