Add --method and --any-status flags for tricky targets - #67
Merged
Conversation
Some targets only serve raw .git files over a non-GET method, or respond with a non-200 status (e.g. 500) while still returning the real content. - -X/--method: HTTP method used for all requests (default GET). Every session.get(...) is now session.request(method, ...), threaded through the probe, ref, object and recursive-download paths. - --any-status: accept any status code as long as the body is non-empty and not HTML. Default off, so existing 200-only behaviour is preserved. Also harden object discovery so a corrupt .git/index or pack (e.g. an error page saved via --any-status) is skipped with a warning instead of aborting the whole dump. README documents both flags with examples.
arthaud
requested changes
Aug 27, 2026
arthaud
left a comment
Owner
There was a problem hiding this comment.
looks good to me, would just like a minor change for the README, see comment
Comment on lines
65
to
77
| Some targets only serve the raw `.git` files over a non-`GET` method, or | ||
| respond with a non-200 status (e.g. `500`) while still returning the real | ||
| content. For those, combine `--method` and/or `--any-status`: | ||
|
|
||
| ``` | ||
| # Target that only serves clean content over POST | ||
| git-dumper -X POST http://website.com/.git ~/website | ||
|
|
||
| # Target that returns 500 (or other codes) but with real content | ||
| git-dumper --any-status http://website.com/.git ~/website | ||
| ``` | ||
|
|
||
|
|
Owner
There was a problem hiding this comment.
Could we move this in a different section instead of being under Example?
Maybe a section "Custom arguments", and a subsection "HTTP Method" and another one "Ignore HTTP status"?
Address review feedback: split the flag docs out of the Example section into a dedicated "Custom arguments" section with "HTTP Method" and "Ignore HTTP status" subsections.
C00kiie
force-pushed
the
pr/method-any-status
branch
from
August 27, 2026 17:54
ea71191 to
90860da
Compare
arthaud
approved these changes
Aug 28, 2026
Owner
|
Thanks! |
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.
Some targets only serve raw
.gitfiles over a non-GETmethod, or respond with a non-200 status (e.g.500) while still returning the real content. Stock git-dumper can't dump these.-X/--method— HTTP method for all requests (defaultGET). Everysession.get(...)is nowsession.request(method, ...), threaded through the probe, ref, object, and recursive-download paths.--any-status— accept any status code as long as the body is non-empty and not HTML. Default off, so existing 200-only behavior is preserved..git/indexor pack (e.g. an error page saved via--any-status) is skipped with a warning instead of aborting the whole dump.README documents both flags with examples.
Example