mirror of
https://github.com/git/git
synced 2024-08-28 03:59:25 +00:00
cat-file: merge two block into one
There are two "if (opt->all_objects)" blocks next to each other, merge them into one to provide better readability. Helped-by: Jeff King <peff@peff.net> Signed-off-by: ZheNing Hu <adlternative@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e16acc80a7
commit
ee02ac6164
|
@ -520,14 +520,11 @@ static int batch_objects(struct batch_options *opt)
|
||||||
data.info.typep = &data.type;
|
data.info.typep = &data.type;
|
||||||
|
|
||||||
if (opt->all_objects) {
|
if (opt->all_objects) {
|
||||||
|
struct object_cb_data cb;
|
||||||
struct object_info empty = OBJECT_INFO_INIT;
|
struct object_info empty = OBJECT_INFO_INIT;
|
||||||
|
|
||||||
if (!memcmp(&data.info, &empty, sizeof(empty)))
|
if (!memcmp(&data.info, &empty, sizeof(empty)))
|
||||||
data.skip_object_info = 1;
|
data.skip_object_info = 1;
|
||||||
}
|
|
||||||
|
|
||||||
if (opt->all_objects) {
|
|
||||||
struct object_cb_data cb;
|
|
||||||
|
|
||||||
if (has_promisor_remote())
|
if (has_promisor_remote())
|
||||||
warning("This repository uses promisor remotes. Some objects may not be loaded.");
|
warning("This repository uses promisor remotes. Some objects may not be loaded.");
|
||||||
|
|
Loading…
Reference in a new issue