diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-08-11 18:04:11 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-08-11 18:04:11 -0700 |
| commit | e0ad9574ddf5bb14d9ed6808112485ce0da99fea (patch) | |
| tree | 633eb1867a929588ec5b3d8af351a93ba62aac5a /http-fetch.c | |
| parent | Fifth batch (diff) | |
| parent | t: remove test_oid_init in tests (diff) | |
| download | git-e0ad9574ddf5bb14d9ed6808112485ce0da99fea.tar.gz git-e0ad9574ddf5bb14d9ed6808112485ce0da99fea.zip | |
Merge branch 'bc/sha-256-part-3'
The final leg of SHA-256 transition.
* bc/sha-256-part-3: (39 commits)
t: remove test_oid_init in tests
docs: add documentation for extensions.objectFormat
ci: run tests with SHA-256
t: make SHA1 prerequisite depend on default hash
t: allow testing different hash algorithms via environment
t: add test_oid option to select hash algorithm
repository: enable SHA-256 support by default
setup: add support for reading extensions.objectformat
bundle: add new version for use with SHA-256
builtin/verify-pack: implement an --object-format option
http-fetch: set up git directory before parsing pack hashes
t0410: mark test with SHA1 prerequisite
t5308: make test work with SHA-256
t9700: make hash size independent
t9500: ensure that algorithm info is preserved in config
t9350: make hash size independent
t9301: make hash size independent
t9300: use $ZERO_OID instead of hard-coded object ID
t9300: abstract away SHA-1-specific constants
t8011: make hash size independent
...
Diffstat (limited to 'http-fetch.c')
| -rw-r--r-- | http-fetch.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/http-fetch.c b/http-fetch.c index 1df376e745..c4ccc5fea9 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -84,8 +84,11 @@ int cmd_main(int argc, const char **argv) int get_verbosely = 0; int get_recover = 0; int packfile = 0; + int nongit; struct object_id packfile_hash; + setup_git_directory_gently(&nongit); + while (arg < argc && argv[arg][0] == '-') { const char *p; @@ -115,7 +118,8 @@ int cmd_main(int argc, const char **argv) if (argc != arg + 2 - (commits_on_stdin || packfile)) usage(http_fetch_usage); - setup_git_directory(); + if (nongit) + die(_("not a git repository")); git_config(git_default_config, NULL); |
