diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-10-12 14:52:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-12 18:13:25 +0200 |
commit | 70334fc3ebf1c6199014d82bbbf0595b64a8fa90 (patch) | |
tree | 8c4fa2ad3639510f5b90259f48f23c5853eb308d /bundle-uri.c | |
parent | bundle: add flags to verify_bundle() (diff) | |
download | git-70334fc3ebf1c6199014d82bbbf0595b64a8fa90.tar.xz git-70334fc3ebf1c6199014d82bbbf0595b64a8fa90.zip |
bundle-uri: quiet failed unbundlings
When downloading a list of bundles in "all" mode, Git has no
understanding of the dependencies between the bundles. Git attempts to
unbundle the bundles in some order, but some may not pass the
verify_bundle() step because of missing prerequisites. This is passed as
error messages to the user, even when they eventually succeed in later
attempts after their dependent bundles are unbundled.
Add a new VERIFY_BUNDLE_QUIET flag to verify_bundle() that avoids the
error messages from the missing prerequisite commits. The method still
returns the number of missing prerequisit commits, allowing callers to
unbundle() to notice that the bundle failed to apply.
Use this flag in bundle-uri.c and test that the messages go away for
'git clone --bundle-uri' commands.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle-uri.c')
-rw-r--r-- | bundle-uri.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bundle-uri.c b/bundle-uri.c index d9060be707..d872acf5ab 100644 --- a/bundle-uri.c +++ b/bundle-uri.c @@ -308,7 +308,8 @@ static int unbundle_from_file(struct repository *r, const char *file) * a reachable ref pointing to the new tips, which will reach * the prerequisite commits. */ - if ((result = unbundle(r, &header, bundle_fd, NULL, 0))) + if ((result = unbundle(r, &header, bundle_fd, NULL, + VERIFY_BUNDLE_QUIET))) return 1; /* |