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>
This commit is contained in:

committed by
Junio C Hamano

parent
89bd7fedf9
commit
70334fc3eb
10
bundle.c
10
bundle.c
@ -216,7 +216,10 @@ int verify_bundle(struct repository *r,
|
||||
add_pending_object(&revs, o, name);
|
||||
continue;
|
||||
}
|
||||
if (++ret == 1)
|
||||
ret++;
|
||||
if (flags & VERIFY_BUNDLE_QUIET)
|
||||
continue;
|
||||
if (ret == 1)
|
||||
error("%s", message);
|
||||
error("%s %s", oid_to_hex(oid), name);
|
||||
}
|
||||
@ -243,7 +246,10 @@ int verify_bundle(struct repository *r,
|
||||
assert(o); /* otherwise we'd have returned early */
|
||||
if (o->flags & SHOWN)
|
||||
continue;
|
||||
if (++ret == 1)
|
||||
ret++;
|
||||
if (flags & VERIFY_BUNDLE_QUIET)
|
||||
continue;
|
||||
if (ret == 1)
|
||||
error("%s", message);
|
||||
error("%s %s", oid_to_hex(oid), name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user