{"thread":{"id":"51881","subject":"Git Test Coverage Report (Sept 19)","startedAt":"2019-09-19T14:23:46Z","lastAt":"2019-09-24T06:58:17Z","messageCount":3,"participants":["Derrick Stolee","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"382581","messageId":"9fdd15ab-b2dc-f5fa-9969-90bd57014ff5@gmail.com","threadId":"51881","inReplyTo":null,"subject":"Git Test Coverage Report (Sept 19)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-09-19T14:23:37Z","receivedAt":"2019-09-19T14:23:46Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"Here is today's test coverage report.\n\nIt's been a while, because I intended to modify the code to add commit-by-commit grouping of the uncovered lines. However, that is not a simple change and I haven't gotten around to it. Hopefully I can do it soon, or someone could contribute one on https://github.com/derrickstolee/git-test-coverage ;)\n\nThanks,\n-Stolee\n\n[1] https://derrickstolee.github.io/git-test-coverage/reports/2019-09-19.htm\n[2] https://derrickstolee.github.io/git-test-coverage/reports/2019-09-19.txt\n\n---\n\npu\t6185f37155d4d7761f8ecee61a3e30c3f82361c1\njch\t13ab3aebd5a7b54884ad3d7261ab1a1ffcd27dd8\nnext\t18eeb5a2650ef4d662f5c9bb888cac8694753ba5\nmaster\t4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a\nmaster@{1}\tff66981f4593aec0f3b3eeace0eacb7dbe44fd8c\n\n\nUncovered code in 'pu' not in 'jch'\n--------------------------------------------------------\n\nbuiltin/fetch-pack.c\n\nbuiltin/pack-objects.c\n820a5361 995) BUG(\"configured exclusion wasn't configured\");\n820a5361 2931) die(_(\"value of uploadpack.blobpackfileuri must be \"\n820a5361 2934) die(_(\"object already configured in another \"\n\nbuiltin/rebase.c\n1406adc0 1897) die(_(\"cannot combine '--rebase-merges' with \"\n\nbuiltin/receive-pack.c\nfabec2c5 433) the_hash_algo->init_fn(&ctx);\nfabec2c5 434) the_hash_algo->update_fn(&ctx, key_in, key_len);\nfabec2c5 435) the_hash_algo->final_fn(key, &ctx);\n\nbuiltin/replace.c\n28ba1830 275) if (strbuf_read(&result, cmd.out, the_hash_algo->hexsz + 1) < 0) {\n\nbuiltin/rev-parse.c\n7e0d029f 735) abbrev = hexsz;\n\nbuiltin/submodule--helper.c\n8d4d86b0 427) printf(\"%06o %s U\\t\", ce->ce_mode, oid_to_hex(&null_oid));\n\nfetch-pack.c\n820a5361 1397) die(\"expected '<hash> <uri>', got: %s\\n\", reader->line);\n820a5361 1402) die(\"expected DELIM\");\n820a5361 1530) die(\"fetch-pack: unable to spawn http-fetch\");\n820a5361 1534) die(\"fetch-pack: expected keep then TAB at start of http-fetch output\");\n820a5361 1539) die(\"fetch-pack: expected hash then LF at end of http-fetch output\");\n820a5361 1546) die(\"fetch-pack: unable to finish http-fetch\");\n820a5361 1550) die(\"fetch-pack: pack downloaded from %s does not match expected hash %.*s\",\n820a5361 1551)     uri, (int) the_hash_algo->hexsz,\n820a5361 1552)     packfile_uris.items[i].string);\n\nhttp-fetch.c\n\nhttp.c\n390b015a 2305) target ? hash_to_hex(target->hash) : base_url,\n\npackfile.c\nd6f3fabd 1457) return;\n\nprotocol.c\n\nread-cache.c\nee70c128 1743) if (advice_unknown_index_extension) {\nee70c128 1744) warning(_(\"ignoring optional %.4s index extension\"), ext);\nee70c128 1745) advise(_(\"This is likely due to the file having been written by a newer\\n\"\n\nremote-curl.c\n\nsequencer.c\n7c5b2e1d 832) free(kv.items[name_i].util);\n7c5b2e1d 836) free(kv.items[email_i].util);\n7c5b2e1d 840) free(kv.items[date_i].util);\nccafcb32 884) static char *read_author_date_or_null(void)\nccafcb32 888) if (read_author_script(rebase_path_author_script(),\nccafcb32 890) return NULL;\nccafcb32 891) return date;\n7258d3d1 902) error(_(\"malformed ident line\"));\n7258d3d1 903) return NULL;\n7258d3d1 912) static void push_dates(struct child_process *child)\n7258d3d1 914) time_t now = time(NULL);\n7258d3d1 915) struct strbuf date = STRBUF_INIT;\n7258d3d1 917) strbuf_addf(&date, \"@%\"PRIuMAX, (uintmax_t)now);\n7258d3d1 918) argv_array_pushf(&child->env_array, \"GIT_AUTHOR_DATE=%s\", date.buf);\n7258d3d1 919) argv_array_pushf(&child->env_array, \"GIT_COMMITTER_DATE=%s\", date.buf);\n7258d3d1 920) strbuf_release(&date);\n7258d3d1 921) }\nccafcb32 983) int res = -1;\nccafcb32 984) struct strbuf datebuf = STRBUF_INIT;\nccafcb32 985) char *date = read_author_date_or_null();\nccafcb32 987) if (!date)\nccafcb32 988) return -1;\nccafcb32 990) strbuf_addf(&datebuf, \"@%s\", date);\nccafcb32 991) res = setenv(\"GIT_COMMITTER_DATE\", datebuf.buf, 1);\nccafcb32 993) strbuf_release(&datebuf);\nccafcb32 994) free(date);\nccafcb32 996) if (res)\nccafcb32 997) return -1;\n7258d3d1 1016) push_dates(&cmd);\nccafcb32 1428) return error(_(\"malformed ident line\"));\nccafcb32 1430) return error(_(\"corrupted author without date information\"));\n7258d3d1 1488) res = -1;\n7258d3d1 1489) goto out;\n7258d3d1 3605) push_dates(&cmd);\n\nsha1-file.c\nd6f3fabd 1571) return;\nd6f3fabd 1580) return;\n\nupload-pack.c\na8d662e3 130) return readsz;\n820a5361 149) BUG(\"packfile_uris requires sideband-all\");\na8d662e3 354) send_client_data(1, output_state.buffer, output_state.used);\n820a5361 1387) string_list_clear(&data->uri_protocols, 0);\n\nCommits introducting uncovered code:\nbrian m. carlson\tfabec2c5 builtin/receive-pack: switch to use the_hash_algo\nbrian m. carlson\t28ba1830 builtin/replace: make hash size independent\nbrian m. carlson\t7e0d029f builtin/rev-parse: switch to use the_hash_algo\nbrian m. carlson\t8d4d86b0 cache: remove null_sha1\nJonathan Nieder\tee70c128 index: offer advice for unknown index extensions\nJonathan Tan\t820a5361 upload-pack: send part of packfile response as uri\nJonathan Tan\ta8d662e3 upload-pack: refactor reading of pack-objects out\nJunio C Hamano\t390b015a Merge branch 'jt/fetch-cdn-offload' into pu\nMatheus Tavares\td6f3fabd object-store: add lock to read_object_file_extended()\nRohit Ashiwal\t1406adc0 rebase -i: add --ignore-whitespace flag\nRohit Ashiwal\t7c5b2e1d sequencer: allow callers of read_author_script() to ignore fields\nRohit Ashiwal\tccafcb32 rebase -i: support --committer-date-is-author-date\nRohit Ashiwal\t7258d3d1 rebase -i: support --ignore-date\n\n\nUncovered code in 'jch' not in 'next'\n--------------------------------------------------------\n\nbuiltin/am.c\n14151aad 1696) die(_(\"unable to write index file\"));\n\nbuiltin/pack-objects.c\n7c59828b 1136) return 1;\n7c59828b 2694) (reuse_packfile_bitmap &&\n7c59828b 2695)  bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));\nd35b73c5 2847) allow_pack_reuse = git_config_bool(k, v);\nd35b73c5 2848) return 0;\n\nbuiltin/stash.c\n0ac924d8 1135) ret = -1;\n0ac924d8 1136) goto done;\n\ncommit-graph.c\nfbab552a 483) die(\"dying as requested by the '%s' variable on commit-graph load!\",\n\ndir.c\n89a1f4aa 374) return MATCHED_RECURSIVELY_LEADING_PATHSPEC;\n\nname-hash.c\n5a0c3ea1 98) hashmap_remove(&istate->dir_hash, &dir->ent, NULL);\n\npack-bitmap.c\n7c59828b 791) return; /* broken packfile, punt */\n7c59828b 808) return;\n7c59828b 811) return;\n7c59828b 823) return;\n7c59828b 861) i = bitmap_git->pack->num_objects / BITS_IN_EWORD;\n934b7d0a 903) return 0;\n\nread-cache.c\n14151aad 1489) return -1;\n\nsequencer.c\na47ba3c7 3917) res = error_errno(_(\"could not stat '%s'\"),\na47ba3c7 3923) res = -1; /* message was printed */\n\nsha1-name.c\n59fa5f5a 1172) return MISSING_OBJECT;\n59fa5f5a 1178) return MISSING_OBJECT;\n\nt/helper/test-hashmap.c\n92b660d9 106) hashmap_entry_init(&entries[i]->ent, hashes[i]);\ne1c7b970 107) hashmap_add(&map, &entries[i]->ent);\n92b660d9 119) hashmap_entry_init(&entries[i]->ent, hashes[i]);\ne1c7b970 120) hashmap_add(&map, &entries[i]->ent);\n\nt/helper/test-lazy-init-name-hash.c\n7a558228 46) printf(\"dir %08x %7d %s\\n\", dir->ent._hash, dir->nr, dir->name);\n7a558228 52) printf(\"name %08x %s\\n\", ce->ent._hash, ce->name);\n\nt/helper/test-progress.c\n2bb74b53 48) die(\"need a title for the progress output\");\n2bb74b53 59) die(\"invalid input: '%s'\\n\", line.buf);\n2bb74b53 67) die(\"invalid input: '%s'\\n\", line.buf);\n2bb74b53 70) die(\"invalid input: '%s'\\n\", line.buf);\n\nCommits introducting uncovered code:\nElijah Newren\t89a1f4aa dir: if our pathspec might match files under a dir, recurse into it\nEric Wong\t5a0c3ea1 hashmap_remove takes \"const struct hashmap_entry *\"\nEric Wong\t92b660d9 hashmap_entry_init takes \"struct hashmap_entry *\"\nEric Wong\te1c7b970 hashmap_add takes \"struct hashmap_entry *\"\nEric Wong\t7a558228 hashmap_entry: detect improper initialization\nJeff King\t7c59828b pack-objects: improve partial packfile reuse\nJeff King\td35b73c5 pack-objects: introduce pack.allowPackReuse\nJeff King\tfbab552a commit-graph: bump DIE_ON_LOAD check to actual load-time\nJeff King\t934b7d0a pack-bitmap: introduce bitmap_walk_contains()\nPhillip Wood\ta47ba3c7 rebase -i: check for updated todo after squash and reword\nRené Scharfe\t59fa5f5a sha1-name: check for overflow of N in \"foo^N\" and \"foo~N\"\nSZEDER Gábor\t2bb74b53 Test the progress display\nThomas Gummerer\t14151aad factor out refresh_and_write_cache function\nThomas Gummerer\t0ac924d8 stash: make sure to write refreshed cache\n\n\nUncovered code in 'next' not in 'master'\n--------------------------------------------------------\n\nbuiltin/am.c\n0dfed92d 1276) die(_(\"missing author line in commit %s\"),\n0dfed92d 1277)       oid_to_hex(&commit->object.oid));\n\nbuiltin/checkout.c\n65c01c64 766) strbuf_add_unique_abbrev(&old_commit_shortname,\n65c01c64 767)  &old_branch_info->commit->object.oid,\n65c01c64 769) o.ancestor = old_commit_shortname.buf;\n\nbuiltin/merge-recursive.c\n9822175d 68) die_resolve_conflict(\"merge\");\n\nbuiltin/push.c\n8e4c8af0 609) die(_(\"bad repository '%s'\"), repo);\n8e4c8af0 625) die(_(\"--all and --tags are incompatible\"));\n8e4c8af0 627) die(_(\"--all can't be combined with refspecs\"));\n8e4c8af0 631) die(_(\"--mirror and --tags are incompatible\"));\n8e4c8af0 636) die(_(\"--all and --mirror are incompatible\"));\n\nbuiltin/rebase.c\n2b318aa6 1273) goto done;\nc0efb4c1 1289) goto done;\n\ncache-tree.c\n724dd767 619) cache_tree_free(&index_state->cache_tree);\n724dd767 620) cache_tree_valid = 0;\n724dd767 633) return WRITE_TREE_PREFIX_ERROR;\n724dd767 653) fprintf(stderr, \"BUG: There are unmerged index entries:\\n\");\n724dd767 654) for (i = 0; i < index_state->cache_nr; i++) {\n724dd767 655) const struct cache_entry *ce = index_state->cache[i];\n724dd767 656) if (ce_stage(ce))\n724dd767 657) fprintf(stderr, \"BUG: %d %.*s\\n\", ce_stage(ce),\n724dd767 658) (int)ce_namelen(ce), ce->name);\n724dd767 660) BUG(\"unmerged index entries when writing inmemory index\");\n\nconnect.c\nebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n\nmerge-recursive.c\nf836bf39 950) ret = err(opt, _(\"cannot read object %s '%s'\"),\nf836bf39 952) goto free_buf;\n98a1d3d8 3677) return -1;\nff1bfa2c 3741)    oid_to_hex(merge_bases[i]));\n\npack-bitmap.c\ndad3f060 712) object = parse_object_or_die(get_tagged_oid(tag), NULL);\n\npack-objects.c\n3a37876b 185) BUG(\"duplicate object inserted into hash\");\n\nrepo-settings.c\n50f26bd0 57) UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 1);\n\nsetup.c\ne2683d51 952)     !is_dir_sep(dir->buf[min_offset - 1])) {\ne2683d51 953) strbuf_addch(dir, '/');\ne2683d51 954) min_offset++;\n\ntrace2/tr2_dst.c\n1fd881d4 218) warning(\"trace2: unknown value for '%s': '%s'\",\n\ntrace2/tr2_tgt_normal.c\ne3443055 189) strbuf_addf(&buf_payload, \"alias %s -> \", alias);\ne3443055 190) sq_append_quote_argv_pretty(&buf_payload, argv);\ne3443055 201) strbuf_addf(&buf_payload, \"child_start[%d]\", cmd->trace2_child_id);\ne3443055 204) strbuf_addstr(&buf_payload, \" cd \");\ne3443055 206) strbuf_addstr(&buf_payload, \";\");\ne3443055 214) strbuf_addch(&buf_payload, ' ');\ne3443055 216) strbuf_addstr(&buf_payload, \"git \");\ne3443055 217) sq_append_quote_argv_pretty(&buf_payload, cmd->argv);\ne3443055 242) if (exe) {\ne3443055 244) strbuf_addch(&buf_payload, ' ');\ne3443055 246) sq_append_quote_argv_pretty(&buf_payload, argv);\n\ntrace2/tr2_tgt_perf.c\n371df1be 88) fl_end_col = buf->len + TR2FMT_PERF_FL_WIDTH;\n371df1be 90) if (file && *file) {\n371df1be 91) struct strbuf buf_fl = STRBUF_INIT;\n371df1be 93) strbuf_addf(&buf_fl, \"%s:%d\", file, line);\n371df1be 95) if (buf_fl.len <= TR2FMT_PERF_FL_WIDTH)\n371df1be 96) strbuf_addbuf(buf, &buf_fl);\n371df1be 98) size_t avail = TR2FMT_PERF_FL_WIDTH - 3;\n371df1be 99) strbuf_addstr(buf, \"...\");\n371df1be 100) strbuf_add(buf,\n371df1be 101)    &buf_fl.buf[buf_fl.len - avail],\n371df1be 105) strbuf_release(&buf_fl);\n371df1be 108) while (buf->len < fl_end_col)\n371df1be 111) strbuf_addstr(buf, \" | \");\n742ed633 302) strbuf_addf(&buf_payload, \"alias:%s argv:[\", alias);\n742ed633 303) sq_append_quote_argv_pretty(&buf_payload, argv);\n742ed633 304) strbuf_addch(&buf_payload, ']');\n742ed633 335) strbuf_addstr(&buf_payload, \"git\");\n742ed633 336) if (cmd->argv[0])\n742ed633 337) strbuf_addch(&buf_payload, ' ');\n742ed633 391) strbuf_addstr(&buf_payload, \"argv:[\");\n742ed633 392) if (exe) {\n742ed633 393) strbuf_addstr(&buf_payload, exe);\n742ed633 394) if (argv[0])\n742ed633 395) strbuf_addch(&buf_payload, ' ');\n742ed633 397) sq_append_quote_argv_pretty(&buf_payload, argv);\n742ed633 398) strbuf_addch(&buf_payload, ']');\nda4589ce 459) strbuf_addf(&buf_payload, \"label:%s\", label);\nda4589ce 460) if (fmt && *fmt) {\nda4589ce 461) strbuf_addch(&buf_payload, ' ');\nda4589ce 462) maybe_append_string_va(&buf_payload, fmt, ap);\nda4589ce 479) strbuf_addf(&buf_payload, \"label:%s\", label);\nda4589ce 480) if (fmt && *fmt) {\nda4589ce 481) strbuf_addch(&buf_payload, ' ' );\nda4589ce 482) maybe_append_string_va(&buf_payload, fmt, ap);\n\nCommits introducting uncovered code:\nDenton Liu\t2b318aa6 rebase: refactor can_fast_forward into goto tower\nDenton Liu\tc0efb4c1 rebase: fast-forward --onto in more cases\nDerrick Stolee\t50f26bd0 fetch: add fetch.writeCommitGraph config setting\nElijah Newren\t98a1d3d8 merge-recursive: exit early if index != head\nElijah Newren\t65c01c64 checkout: provide better conflict hunk description with detached HEAD\nElijah Newren\t9822175d Ensure index matches head before invoking merge machinery, round N\nElijah Newren\t724dd767 cache-tree: share code between functions writing an index as a tree\nElijah Newren\tf836bf39 merge-recursive: future-proof update_file_flags() against memory leaks\nElijah Newren\tff1bfa2c merge-recursive: use common name for ancestors/common/base_list\nJeff Hostetler\t371df1be trace2: cleanup column alignment in perf target format\nJeff Hostetler\te3443055 trace2: cleanup whitespace in normal format\nJeff Hostetler\tda4589ce trace2: trim whitespace in region messages in perf target format\nJeff Hostetler\t742ed633 trace2: cleanup whitespace in perf format\nJeff King\t3a37876b pack-objects: drop packlist index_pos optimization\nJeff King\t0dfed92d git-am: handle missing \"author\" when parsing commit\nJohannes Schindelin\te2683d51 Fix .git/ discovery at the root of UNC shares\nRené Scharfe\t1fd881d4 trace2: use warning() directly in tr2_dst_malformed_warning()\nRené Scharfe\tdad3f060 tag: factor out get_tagged_oid()\nThomas Gummerer\t8e4c8af0 push: disallow --all and refspecs when remote.<name>.mirror is set\nTorsten Bögershausen\tebb8d2c9 mingw: support UNC in git clone file://server/share/repo\n\n\nUncovered code in 'master' not in 'master@{1}'\n--------------------------------------------------------\n\narchive-tar.c\n71d41ff6 161) BUG(\"pax extended header length miscalculated as %\"PRIuMAX\n\nbuiltin/cat-file.c\nb14ed5ad 529) warning(\"This repository uses promisor remotes. Some objects may not be loaded.\");\n\nbuiltin/fetch.c\n24bc1a12 1406) warning(_(\"not setting upstream for a remote remote-tracking branch\"));\n\nbuiltin/rev-list.c\ncf9ceb5a 476) die(\n\nfetch-pack.c\naaf633c2 911) else if (args->depth > 0 || is_repository_shallow(r))\n\nlist-objects-filter-options.c\nf56f7642 44) BUG(\"filter_options already populated\");\nf56f7642 236) die(_(\"multiple filter-specs cannot be combined\"));\ncf9ceb5a 286) BUG(\"no filter_spec available for this filter\");\ne987df5f 321) return;\n\nlist-objects-filter.c\ne987df5f 585) BUG(\"expected oidset to be cleared already\");\n\nlist-objects.c\n9430147c 210) ctx->show_object(obj, base->buf, ctx->show_data);\n\npath.c\nce17feb1 1234) return -1;\nce17feb1 1238) return -1;\nce17feb1 1247) return -1;\n\npromisor-remote.c\ndb27dca5 25) die(_(\"Remote with no URL\"));\n48de3158 61) warning(_(\"promisor remote name cannot begin with '/': %s\"),\n48de3158 63) return NULL;\nfaf2abf4 93) previous->next = r->next;\n4ca9474e 108) return git_config_string(&core_partial_clone_filter_default,\nfa3d1b63 139) return 0;\n9e27beaa 202) static int remove_fetched_oids(struct repository *repo,\n9e27beaa 206) int i, remaining_nr = 0;\n9e27beaa 207) int *remaining = xcalloc(oid_nr, sizeof(*remaining));\n9e27beaa 208) struct object_id *old_oids = *oids;\n9e27beaa 211) for (i = 0; i < oid_nr; i++)\n9e27beaa 212) if (oid_object_info_extended(repo, &old_oids[i], NULL,\n9e27beaa 214) remaining[i] = 1;\n9e27beaa 215) remaining_nr++;\n9e27beaa 218) if (remaining_nr) {\n9e27beaa 219) int j = 0;\n9e27beaa 220) new_oids = xcalloc(remaining_nr, sizeof(*new_oids));\n9e27beaa 221) for (i = 0; i < oid_nr; i++)\n9e27beaa 222) if (remaining[i])\n9e27beaa 223) oidcpy(&new_oids[j++], &old_oids[i]);\n9e27beaa 224) *oids = new_oids;\n9e27beaa 225) if (to_free)\n9e27beaa 226) free(old_oids);\n9e27beaa 229) free(remaining);\n9e27beaa 231) return remaining_nr;\n9e27beaa 248) if (remaining_nr == 1)\n9e27beaa 249) continue;\n9e27beaa 250) remaining_nr = remove_fetched_oids(repo, &remaining_oids,\n9e27beaa 252) if (remaining_nr) {\n9e27beaa 253) to_free = 1;\n9e27beaa 254) continue;\n9e27beaa 262) free(remaining_oids);\n\nref-filter.c\n8b3f33ef 1042) return xstrdup(\"\");\n\nrepo-settings.c\naaf633c2 43) r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_DEFAULT;\naaf633c2 53) UPDATE_DEFAULT_BOOL(r->settings.pack_use_sparse, 1);\naaf633c2 54) UPDATE_DEFAULT_BOOL(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);\n\nsequencer.c\ne145d993 3368) (!opts->strategy || !strcmp(opts->strategy, \"recursive\")) ?\n\ntree-walk.c\n5aa02f98 194) BUG(\"too small buffer passed to make_traverse_path\");\n5aa02f98 199) BUG(\"traverse_info pathlen does not match strings\");\n5aa02f98 208) BUG(\"traverse_info ran out of list items\");\n\nunpack-trees.c\n90553847 1145) if (*info->prev->name)\n90553847 1148) printf(\"%s\", info->name);\n\nupload-pack.c\ncf9ceb5a 148) sq_quote_buf(&buf, spec);\n\nwrapper.c\n9827d4c1 31) die(\"Out of memory, strdup failed\");\n9827d4c1 45) if (!gentle)\n9827d4c1 46) die(\"Out of memory, malloc failed (tried to allocate %lu bytes)\",\n9827d4c1 49) error(\"Out of memory, malloc failed (tried to allocate %lu bytes)\",\n9827d4c1 51) return NULL;\n9827d4c1 117) die(\"Out of memory, realloc failed\");\n9827d4c1 133) die(\"Out of memory, calloc failed\");\n\nCommits introducting uncovered code:\nbrian m. carlson\tce17feb1 path: add a function to check for path suffix\nChristian Couder\tdb27dca5 Remove fetch-object.{c,h} in favor of promisor-remote.{c,h}\nChristian Couder\tb14ed5ad Use promisor_remote_get_direct() and has_promisor_remote()\nChristian Couder\t9e27beaa promisor-remote: implement promisor_remote_get_direct()\nChristian Couder\tfa3d1b63 promisor-remote: parse remote.*.partialclonefilter\nChristian Couder\t4ca9474e Move core_partial_clone_filter_default to promisor-remote.c\nChristian Couder\tfaf2abf4 promisor-remote: use repository_format_partial_clone\nChristian Couder\t48de3158 Add initial support for many promisor remotes\nCorentin BOMPARD\t24bc1a12 pull, fetch: add --set-upstream option\nDerrick Stolee\taaf633c2 repo-settings: create feature.experimental setting\nJeff King\t5aa02f98 tree-walk: harden make_traverse_path() length computations\nJeff King\t9827d4c1 packfile: drop release_pack_memory()\nJeff King\t90553847 tree-walk: drop oid from traverse_info\nJohannes Schindelin\te145d993 rebase -r: support merge strategies other than `recursive`\nMatthew DeVore\t9430147c list-objects-filter: encapsulate filter components\nMatthew DeVore\te987df5f list-objects-filter: implement composite filters\nMatthew DeVore\tf56f7642 list-objects-filter-options: move error check up\nMatthew DeVore\tcf9ceb5a list-objects-filter-options: make filter_spec a string_list\nMischa POSLAWSKY\t8b3f33ef ref-filter: initialize empty name or email fields\nRené Scharfe\t71d41ff6 archive-tar: turn length miscalculation warning into BUG\n\n"},{"id":"382770","messageId":"1ed86989-9ba2-0cd7-b6f7-654d1943b1d7@gmail.com","threadId":"51881","inReplyTo":"9fdd15ab-b2dc-f5fa-9969-90bd57014ff5@gmail.com","subject":"Re: Git Test Coverage Report (Sept 19)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-09-23T14:00:37Z","receivedAt":"2019-09-23T14:00:42Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 9/19/2019 10:23 AM, Derrick Stolee wrote:\n> Here is today's test coverage report.\n\nAnd I took a close look at the report, looking for interesting cases\nthat are not covered. Most of the uncovered lines were due to simple\nrefactors or error conditions. I point out a few below that took a\nbit of digging to consider.\n\n> sequencer.c\n> ccafcb32 884) static char *read_author_date_or_null(void)\n> ccafcb32 888) if (read_author_script(rebase_path_author_script(),\n> ccafcb32 890) return NULL;\n> ccafcb32 891) return date;\n\nThis method was added by this commit, but is not tested.\n> ccafcb32 983) int res = -1;\n> ccafcb32 984) struct strbuf datebuf = STRBUF_INIT;\n> ccafcb32 985) char *date = read_author_date_or_null();\n> ccafcb32 987) if (!date)\n> ccafcb32 988) return -1;\n> ccafcb32 990) strbuf_addf(&datebuf, \"@%s\", date);\n> ccafcb32 991) res = setenv(\"GIT_COMMITTER_DATE\", datebuf.buf, 1);\n> ccafcb32 993) strbuf_release(&datebuf);\n> ccafcb32 994) free(date);\n> ccafcb32 996) if (res)\n> ccafcb32 997) return -1;\n\nThese lines are inside an 'if (opts->committer_date_is_author_date)'\nblock, and there is another block that _is_ covered.\n\n(Philip already pointed this out in his review. Thanks!)\n\n> 7258d3d1 912) static void push_dates(struct child_process *child)\n> 7258d3d1 914) time_t now = time(NULL);\n> 7258d3d1 915) struct strbuf date = STRBUF_INIT;\n> 7258d3d1 917) strbuf_addf(&date, \"@%\"PRIuMAX, (uintmax_t)now);\n> 7258d3d1 918) argv_array_pushf(&child->env_array, \"GIT_AUTHOR_DATE=%s\", date.buf);\n> 7258d3d1 919) argv_array_pushf(&child->env_array, \"GIT_COMMITTER_DATE=%s\", date.buf);\n> 7258d3d1 920) strbuf_release(&date);\n> 7258d3d1 921) }\n> 7258d3d1 1016) push_dates(&cmd);\n> 7258d3d1 1488) res = -1;\n> 7258d3d1 1489) goto out;\n> 7258d3d1 3605) push_dates(&cmd);\n\nSimilarly, the \"push_dates()\" method is not covered.\n\n---\n\n> builtin/pack-objects.c\n> 7c59828b 2694) (reuse_packfile_bitmap &&\n> 7c59828b 2695)  bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));\n\nThis change to obj_is_packed(oid) is a small change in a\nreally big commit. Here is the change:\n\n@@ -2571,7 +2706,9 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,\n \n static int obj_is_packed(const struct object_id *oid)\n {\n-       return !!packlist_find(&to_pack, oid, NULL);\n+       return packlist_find(&to_pack, oid, NULL) ||\n+               (reuse_packfile_bitmap &&\n+                bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));\n }\n\nSo, every time this is called, the || is short-circuited because\npacklist_find() returns true.\n\nDoes this change the meaning of this method? obj_is_packed() would\nonly return true if we found the object specifically in the to_pack\nlist. Now, we would also return true if the object is in the bitmap\nwalk.\n\nIf this is only a performance improvement, and the bitmap_walk_contains()\nmethod would return the same as packlist_find(), then should the order\nbe swapped? Or rather, should reuse_packfile_bitmap indicate which to use\nas the full result?\n\n> d35b73c5 2847) allow_pack_reuse = git_config_bool(k, v);\n> d35b73c5 2848) return 0;\n\nI initially thought that introducing an untested config setting is\ngenerally not a good idea, but allow_pack_reuse is on by default.\nThis config setting is just a safety valve to turn the feature _off_\nif necessary.\n\n--- \n> builtin/checkout.c\n> 65c01c64 766) strbuf_add_unique_abbrev(&old_commit_shortname,\n> 65c01c64 767)  &old_branch_info->commit->object.oid,\n> 65c01c64 769) o.ancestor = old_commit_shortname.buf;\n\nThe entire point of this commit is to modify the output during\na 'git checkout -m' in a detached HEAD case. Odd that a test\nwas not added to demonstrate the expected output change.\n\nSince the point of the test coverage report is to find places\nwhere a bug may exist or may appear later, this block may be\nsmall enough to ignore.\n\n> cache-tree.c\n> 724dd767 619) cache_tree_free(&index_state->cache_tree);\n> 724dd767 620) cache_tree_valid = 0;\n> 724dd767 633) return WRITE_TREE_PREFIX_ERROR;\n> 724dd767 653) fprintf(stderr, \"BUG: There are unmerged index entries:\\n\");\n> 724dd767 654) for (i = 0; i < index_state->cache_nr; i++) {\n> 724dd767 655) const struct cache_entry *ce = index_state->cache[i];\n> 724dd767 656) if (ce_stage(ce))\n> 724dd767 657) fprintf(stderr, \"BUG: %d %.*s\\n\", ce_stage(ce),\n> 724dd767 658) (int)ce_namelen(ce), ce->name);\n> 724dd767 660) BUG(\"unmerged index entries when writing inmemory index\");\n\nThese uncovered lines were moved during a refactor, which means they\nwere uncovered before. Lots of strange branching happening here, but\nit must be in very rare cases.\n \n> connect.c\n> ebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n\n> setup.c\n> e2683d51 952)     !is_dir_sep(dir->buf[min_offset - 1])) {\n> e2683d51 953) strbuf_addch(dir, '/');\n> e2683d51 954) min_offset++;\n\n(These lines are artifacts of not running test coverage on Windows.)\n\n> promisor-remote.c\n\n(We have discussed the test coverage for multiple promisor remotes before.)\n \n---\n\nThanks, everyone. Things are looking good.\n\n-Stolee\n\n"},{"id":"382833","messageId":"20190924065806.GB30419@sigill.intra.peff.net","threadId":"51881","inReplyTo":"1ed86989-9ba2-0cd7-b6f7-654d1943b1d7@gmail.com","subject":"Re: Git Test Coverage Report (Sept 19)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-09-24T06:58:06Z","receivedAt":"2019-09-24T06:58:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Sep 23, 2019 at 10:00:37AM -0400, Derrick Stolee wrote:\n\n> > builtin/pack-objects.c\n> > 7c59828b 2694) (reuse_packfile_bitmap &&\n> > 7c59828b 2695)  bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));\n> \n> This change to obj_is_packed(oid) is a small change in a\n> really big commit. Here is the change:\n\nI'd suggest not looking too closely at this one yet. This was a\npreliminary split by Christian of some older code that I had written. I\nthink it needs to be split up more, and probably does need more test\ncoverage (bitmaps are only enabled in a few specific scripts).\n\n> @@ -2571,7 +2706,9 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,\n>  \n>  static int obj_is_packed(const struct object_id *oid)\n>  {\n> -       return !!packlist_find(&to_pack, oid, NULL);\n> +       return packlist_find(&to_pack, oid, NULL) ||\n> +               (reuse_packfile_bitmap &&\n> +                bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));\n>  }\n> \n> So, every time this is called, the || is short-circuited because\n> packlist_find() returns true.\n\nThat does surprise me, though. I'm not sure if it's insufficient\ntesting, or if there's a bug. \n\n> Does this change the meaning of this method? obj_is_packed() would\n> only return true if we found the object specifically in the to_pack\n> list. Now, we would also return true if the object is in the bitmap\n> walk.\n> \n> If this is only a performance improvement, and the bitmap_walk_contains()\n> method would return the same as packlist_find(), then should the order\n> be swapped? Or rather, should reuse_packfile_bitmap indicate which to use\n> as the full result?\n\nNo, there should be cases where the walk mentions some objects that\naren't added to the to_pack list (that's the point of the reuse code; it\nfast-tracks a big chunk of objects directly to the output).\n\n-Peff\n"}]}