mirror of
https://github.com/git/git
synced 2024-08-28 03:59:25 +00:00
clone: warn on failure to repo_init()
The --bundle-uri option was added in 5556891961
(clone: add
--bundle-uri option, 2022-08-09), but this also introduced a call to
repo_init() whose return value was ignored. Fix that ignored value by
warning that the bundle URI process could not continue if it failed.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e21e663cd1
commit
65da938916
|
@ -1245,8 +1245,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
|
||||||
*/
|
*/
|
||||||
if (bundle_uri) {
|
if (bundle_uri) {
|
||||||
/* At this point, we need the_repository to match the cloned repo. */
|
/* At this point, we need the_repository to match the cloned repo. */
|
||||||
repo_init(the_repository, git_dir, work_tree);
|
if (repo_init(the_repository, git_dir, work_tree))
|
||||||
if (fetch_bundle_uri(the_repository, bundle_uri))
|
warning(_("failed to initialize the repo, skipping bundle URI"));
|
||||||
|
else if (fetch_bundle_uri(the_repository, bundle_uri))
|
||||||
warning(_("failed to fetch objects from bundle URI '%s'"),
|
warning(_("failed to fetch objects from bundle URI '%s'"),
|
||||||
bundle_uri);
|
bundle_uri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue