{"thread":{"id":"52020","subject":"Git Test Coverage Report (October 11)","startedAt":"2019-10-11T13:33:15Z","lastAt":"2019-10-24T17:04:09Z","messageCount":6,"participants":["Derrick Stolee","Jeff King","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"383889","messageId":"c863c09b-f0ed-19c6-356e-12a3ecbc08b9@gmail.com","threadId":"52020","inReplyTo":null,"subject":"Git Test Coverage Report (October 11)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-10-11T13:33:11Z","receivedAt":"2019-10-11T13:33:15Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"Here is today's test coverage report. The usual report format is\navailable online [1], [2]. The report listed below is a new format\nthat groups lines by the commit that introduced them [3]. Thanks\nPeff for the feedback on that idea.\n\nNote: the pu branch does not build due to interactions between\nds/sparse-cone and ew/hashmap, so no coverage is reported.\n\n-Stolee\n\n[1] https://derrickstolee.github.io/git-test-coverage/reports/2019-10-11.htm\n[2] https://derrickstolee.github.io/git-test-coverage/reports/2019-10-11.txt\n[3] https://derrickstolee.github.io/git-test-coverage/reports/2019-10-11-commits.txt\n\n\npu\tef2d425e4a47a663fe2d4a09888b231d2e3b973e\njch\td1237310799dc8d0e6bb8d079c2803e120cac8cc\nnext\tb869b98d4c7f0f91d905d76a6c8ba9b8799289b6\nmaster\t08da6496b61341ec45eac36afcc8f94242763468\nmaster@{1}\t4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a\n\n\nUncovered code in 'pu' not in 'jch'\n--------------------------------------------------------\n\nCommits introducting uncovered code:\n\n\nUncovered code in 'jch' not in 'next'\n--------------------------------------------------------\n\nCommits introducting uncovered code:\nWilliam Baker\t070a4226 fsmonitor: don't fill bitmap with entries to be removed\nfsmonitor.c\n070a4226 20) BUG(\"fsmonitor_dirty has more entries than the index (%\"PRIuMAX\" >= %u)\",\n070a4226 59) BUG(\"fsmonitor_dirty has more entries than the index (%\"PRIuMAX\" > %u)\",\n070a4226 87) BUG(\"fsmonitor_dirty has more entries than the index (%\"PRIuMAX\" > %u)\",\n070a4226 256) BUG(\"fsmonitor_dirty has more entries than the index (%\"PRIuMAX\" > %u)\",\n\n\n\nUncovered code in 'next' not in 'master'\n--------------------------------------------------------\n\nCommits introducting uncovered code:\nElijah Newren\t65c01c64 checkout: provide better conflict hunk description with detached HEAD\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\nElijah Newren\tff1bfa2c merge-recursive: use common name for ancestors/common/base_list\nmerge-recursive.c\nff1bfa2c 3757)    oid_to_hex(merge_bases[i]));\n\nElijah Newren\tf836bf39 merge-recursive: future-proof update_file_flags() against memory leaks\nmerge-recursive.c\nf836bf39 960) ret = err(opt, _(\"cannot read object %s '%s'\"),\nf836bf39 962) goto free_buf;\n\nElijah Newren\t3164e6bd fast-import: fix handling of deleted tags\nfast-import.c\n3164e6bd 2835) first_tag = t->next_tag;\n\nElijah Newren\tb8f50e5b fast-import: add support for new 'alias' command\nfast-import.c\nb8f50e5b 2528) die(\"Invalid ref name or SHA1 expression: %s\", objectish);\nb8f50e5b 2554) return 0;\nb8f50e5b 3118) die(_(\"Expected 'mark' command, got %s\"), command_buf.buf);\nb8f50e5b 3123) die(_(\"Expected 'to' command, got %s\"), command_buf.buf);\n\nElijah Newren\t724dd767 cache-tree: share code between functions writing an index as a tree\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\nElijah Newren\t98a1d3d8 merge-recursive: exit early if index != head\nmerge-recursive.c\n98a1d3d8 3692) return -1;\n\nElijah Newren\t9822175d Ensure index matches head before invoking merge machinery, round N\nbuiltin/merge-recursive.c\n9822175d 68) die_resolve_conflict(\"merge\");\n\nElijah Newren\t208d6924 fast-export: add support for --import-marks-if-exists\nbuiltin/fast-export.c\n208d6924 1220) die(_(\"Cannot pass both --import-marks and --import-marks-if-exists\"));\n\nElijah Newren\t941790d7 fast-export: handle nested tags\nbuiltin/fast-export.c\n941790d7 852) die(_(\"Error: Cannot export nested tags unless --mark-tags is specified.\"));\n941790d7 864) tagged_mark = get_object_mark(tagged);\n\nEric Wong\t28ee7941 hashmap_remove takes \"const struct hashmap_entry *\"\nname-hash.c\n28ee7941 100) hashmap_remove(&istate->dir_hash, &dir->ent, NULL);\n\nEric Wong\td22245a2 hashmap_entry_init takes \"struct hashmap_entry *\"\nt/helper/test-hashmap.c\nd22245a2 109) hashmap_entry_init(&entries[i]->ent, hashes[i]);\nd22245a2 122) hashmap_entry_init(&entries[i]->ent, hashes[i]);\n\nEric Wong\tb94e5c1d hashmap_add takes \"struct hashmap_entry *\"\nt/helper/test-hashmap.c\nb94e5c1d 110) hashmap_add(&map, &entries[i]->ent);\nb94e5c1d 123) hashmap_add(&map, &entries[i]->ent);\n\nEric Wong\tc8e424c9 hashmap: introduce hashmap_free_entries\nt/helper/test-hashmap.c\nc8e424c9 113) hashmap_free(&map);\nc8e424c9 133) hashmap_free(&map);\n\nEric Wong\t87571c3f hashmap: use *_entry APIs for iteration\nt/helper/test-lazy-init-name-hash.c\n87571c3f 44) hashmap_for_each_entry(&the_index.dir_hash, &iter_dir, dir,\n87571c3f 48) hashmap_for_each_entry(&the_index.name_hash, &iter_cache, ce,\n\nJeff King\t7c59828b pack-objects: improve partial packfile reuse\nbuiltin/pack-objects.c\n7c59828b 1136) return 1;\n7c59828b 2694) (reuse_packfile_bitmap &&\n7c59828b 2695)  bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));\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;\n\nJeff King\t934b7d0a pack-bitmap: introduce bitmap_walk_contains()\npack-bitmap.c\n934b7d0a 903) return 0;\n\nJeff King\td35b73c5 pack-objects: introduce pack.allowPackReuse\nbuiltin/pack-objects.c\nd35b73c5 2847) allow_pack_reuse = git_config_bool(k, v);\nd35b73c5 2848) return 0;\n\nJohannes Schindelin\td54dea77 fetch: let --jobs=<n> parallelize --multiple, too\nbuiltin/fetch.c\nd54dea77 113) fetch_parallel_config = git_config_int(k, v);\nd54dea77 114) if (fetch_parallel_config < 0)\nd54dea77 115) die(_(\"fetch.parallel cannot be negative\"));\nd54dea77 116) return 0;\nd54dea77 1566) static int fetch_failed_to_start(struct strbuf *out, void *cb, void *task_cb)\nd54dea77 1568) struct parallel_fetch_state *state = cb;\nd54dea77 1569) const char *remote = task_cb;\nd54dea77 1571) state->result = error(_(\"Could not fetch %s\"), remote);\nd54dea77 1573) return 0;\n\nJohannes Schindelin\tbe5d88e1 test-tool run-command: learn to run (parts of) the testsuite\nt/helper/test-run-command.c\nbe5d88e1 66) static int next_test(struct child_process *cp, struct strbuf *err, void *cb,\nbe5d88e1 69) struct testsuite *suite = cb;\nbe5d88e1 71) if (suite->next >= suite->tests.nr)\nbe5d88e1 72) return 0;\nbe5d88e1 74) test = suite->tests.items[suite->next++].string;\nbe5d88e1 75) argv_array_pushl(&cp->args, \"sh\", test, NULL);\nbe5d88e1 76) if (suite->quiet)\nbe5d88e1 77) argv_array_push(&cp->args, \"--quiet\");\nbe5d88e1 78) if (suite->immediate)\nbe5d88e1 79) argv_array_push(&cp->args, \"-i\");\nbe5d88e1 80) if (suite->verbose)\nbe5d88e1 81) argv_array_push(&cp->args, \"-v\");\nbe5d88e1 82) if (suite->verbose_log)\nbe5d88e1 83) argv_array_push(&cp->args, \"-V\");\nbe5d88e1 84) if (suite->trace)\nbe5d88e1 85) argv_array_push(&cp->args, \"-x\");\nbe5d88e1 86) if (suite->write_junit_xml)\nbe5d88e1 87) argv_array_push(&cp->args, \"--write-junit-xml\");\nbe5d88e1 89) strbuf_addf(err, \"Output of '%s':\\n\", test);\nbe5d88e1 90) *task_cb = (void *)test;\nbe5d88e1 92) return 1;\nbe5d88e1 95) static int test_finished(int result, struct strbuf *err, void *cb,\nbe5d88e1 98) struct testsuite *suite = cb;\nbe5d88e1 99) const char *name = (const char *)task_cb;\nbe5d88e1 101) if (result)\nbe5d88e1 102) string_list_append(&suite->failed, name);\nbe5d88e1 104) strbuf_addf(err, \"%s: '%s'\\n\", result ? \"FAIL\" : \"SUCCESS\", name);\nbe5d88e1 106) return 0;\nbe5d88e1 109) static int test_failed(struct strbuf *out, void *cb, void *task_cb)\nbe5d88e1 111) struct testsuite *suite = cb;\nbe5d88e1 112) const char *name = (const char *)task_cb;\nbe5d88e1 114) string_list_append(&suite->failed, name);\nbe5d88e1 115) strbuf_addf(out, \"FAILED TO START: '%s'\\n\", name);\nbe5d88e1 117) return 0;\nbe5d88e1 125) static int testsuite(int argc, const char **argv)\nbe5d88e1 127) struct testsuite suite = TESTSUITE_INIT;\nbe5d88e1 128) int max_jobs = 1, i, ret;\nbe5d88e1 131) struct option options[] = {\nbe5d88e1 145) memset(&suite, 0, sizeof(suite));\nbe5d88e1 146) suite.tests.strdup_strings = suite.failed.strdup_strings = 1;\nbe5d88e1 148) argc = parse_options(argc, argv, NULL, options,\nbe5d88e1 151) if (max_jobs <= 0)\nbe5d88e1 152) max_jobs = online_cpus();\nbe5d88e1 154) dir = opendir(\".\");\nbe5d88e1 155) if (!dir)\nbe5d88e1 156) die(\"Could not open the current directory\");\nbe5d88e1 157) while ((d = readdir(dir))) {\nbe5d88e1 158) const char *p = d->d_name;\nbe5d88e1 160) if (*p != 't' || !isdigit(p[1]) || !isdigit(p[2]) ||\nbe5d88e1 161)     !isdigit(p[3]) || !isdigit(p[4]) || p[5] != '-' ||\nbe5d88e1 162)     !ends_with(p, \".sh\"))\nbe5d88e1 163) continue;\nbe5d88e1 166) if (!argc) {\nbe5d88e1 167) string_list_append(&suite.tests, p);\nbe5d88e1 168) continue;\nbe5d88e1 171) for (i = 0; i < argc; i++)\nbe5d88e1 172) if (!wildmatch(argv[i], p, 0)) {\nbe5d88e1 173) string_list_append(&suite.tests, p);\nbe5d88e1 174) break;\nbe5d88e1 177) closedir(dir);\nbe5d88e1 179) if (!suite.tests.nr)\nbe5d88e1 180) die(\"No tests match!\");\nbe5d88e1 181) if (max_jobs > suite.tests.nr)\nbe5d88e1 182) max_jobs = suite.tests.nr;\nbe5d88e1 184) fprintf(stderr, \"Running %d tests (%d at a time)\\n\",\nbe5d88e1 187) ret = run_processes_parallel(max_jobs, next_test, test_failed,\nbe5d88e1 190) if (suite.failed.nr > 0) {\nbe5d88e1 191) ret = 1;\nbe5d88e1 192) fprintf(stderr, \"%d tests failed:\\n\\n\", suite.failed.nr);\nbe5d88e1 193) for (i = 0; i < suite.failed.nr; i++)\nbe5d88e1 194) fprintf(stderr, \"\\t%s\\n\", suite.failed.items[i].string);\nbe5d88e1 197) string_list_clear(&suite.tests, 0);\nbe5d88e1 198) string_list_clear(&suite.failed, 0);\nbe5d88e1 200) return !!ret;\nbe5d88e1 209) exit(testsuite(argc - 1, argv + 1));\n\nJosh Steadmon\t87db61a4 trace2: write discard message to sentinel files\ntrace2/tr2_dst.c\n87db61a4 136) strbuf_setlen(&path, base_path_len);\n87db61a4 137) strbuf_addf(&path, \".%d\", attempt_count);\n\nJosh Steadmon\t83e57b04 trace2: discard new traces if target directory has too many files\ntrace2/tr2_dst.c\n83e57b04 90) ret = 1;\n83e57b04 91) goto cleanup;\n83e57b04 145) strbuf_release(&path);\n83e57b04 146) if (tr2_dst_want_warning())\n83e57b04 147) warning(\"trace2: not opening %s trace file due to too \"\n83e57b04 151) return 0;\n\nJunio C Hamano\t360c7ba3 transport: push codepath can take arbitrary repository\ntransport.c\n360c7ba3 1200) trace2_region_leave(\"transport_push\", \"push_submodules\", r);\n\n\n\nUncovered code in 'master' not in 'master@{1}'\n--------------------------------------------------------\n\nCommits introducting uncovered code:\nAlex Henrie\tbaed6bbb diffcore-break: use a goto instead of a redundant if statement\ndiffcore-break.c\nbaed6bbb 295) diff_q(&outq, p);\n\nAli Utku Selen\tddb3c856 shallow.c: don't free unallocated slabs\nshallow.c\nddb3c856 157) continue;\n\nBrandon Casey\t040a6551 cleanup: use internal memory allocation wrapper functions everywhere\nstable-qsort.c\n040a6551 58) char *tmp = xmalloc(size);\n\nBrian Downing\t43fe901b compat: Add simplified merge sort implementation from glibc\nstable-qsort.c\n43fe901b 59) msort_with_tmp(b, n, s, cmp, tmp);\n43fe901b 60) free(tmp);\n\nbrian m. carlson\tfabec2c5 builtin/receive-pack: switch to use the_hash_algo\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\nbrian m. carlson\t28ba1830 builtin/replace: make hash size independent\nbuiltin/replace.c\n28ba1830 275) if (strbuf_read(&result, cmd.out, the_hash_algo->hexsz + 1) < 0) {\n\nbrian m. carlson\t7e0d029f builtin/rev-parse: switch to use the_hash_algo\nbuiltin/rev-parse.c\n7e0d029f 735) abbrev = hexsz;\n\nbrian m. carlson\t8d4d86b0 cache: remove null_sha1\nbuiltin/submodule--helper.c\n8d4d86b0 427) printf(\"%06o %s U\\t\", ce->ce_mode, oid_to_hex(&null_oid));\n\nDenton Liu\t2b318aa6 rebase: refactor can_fast_forward into goto tower\nbuiltin/rebase.c\n2b318aa6 1273) goto done;\n\nDenton Liu\tc0efb4c1 rebase: fast-forward --onto in more cases\nbuiltin/rebase.c\nc0efb4c1 1289) goto done;\n\nDerrick Stolee\t50f26bd0 fetch: add fetch.writeCommitGraph config setting\nrepo-settings.c\n50f26bd0 57) UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 1);\n\nElijah Newren\t89a1f4aa dir: if our pathspec might match files under a dir, recurse into it\ndir.c\n89a1f4aa 374) return MATCHED_RECURSIVELY_LEADING_PATHSPEC;\n\nJeff Hostetler\tda4589ce trace2: trim whitespace in region messages in perf target format\ntrace2/tr2_tgt_perf.c\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\nJeff Hostetler\t371df1be trace2: cleanup column alignment in perf target format\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, \" | \");\n\nJeff Hostetler\te3443055 trace2: cleanup whitespace in normal format\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\nJeff Hostetler\t742ed633 trace2: cleanup whitespace in perf format\ntrace2/tr2_tgt_perf.c\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, ']');\n\nJeff King\t0dfed92d git-am: handle missing \"author\" when parsing commit\nbuiltin/am.c\n0dfed92d 1262) die(_(\"missing author line in commit %s\"),\n0dfed92d 1263)       oid_to_hex(&commit->object.oid));\n\nJeff King\tfbab552a commit-graph: bump DIE_ON_LOAD check to actual load-time\ncommit-graph.c\nfbab552a 483) die(\"dying as requested by the '%s' variable on commit-graph load!\",\n\nJeff King\t3a37876b pack-objects: drop packlist index_pos optimization\npack-objects.c\n3a37876b 185) BUG(\"duplicate object inserted into hash\");\n\nJohannes Schindelin\te2683d51 Fix .git/ discovery at the root of UNC shares\nsetup.c\ne2683d51 952)     !is_dir_sep(dir->buf[min_offset - 1])) {\ne2683d51 953) strbuf_addch(dir, '/');\ne2683d51 954) min_offset++;\n\nPhillip Wood\ta47ba3c7 rebase -i: check for updated todo after squash and reword\nsequencer.c\na47ba3c7 3918) res = error_errno(_(\"could not stat '%s'\"),\na47ba3c7 3924) res = -1; /* message was printed */\n\nRené Scharfe\t59fa5f5a sha1-name: check for overflow of N in \"foo^N\" and \"foo~N\"\nsha1-name.c\n59fa5f5a 1172) return MISSING_OBJECT;\n59fa5f5a 1178) return MISSING_OBJECT;\n\nRené Scharfe\t1fd881d4 trace2: use warning() directly in tr2_dst_malformed_warning()\ntrace2/tr2_dst.c\n1fd881d4 218) warning(\"trace2: unknown value for '%s': '%s'\",\n\nRené Scharfe\tdad3f060 tag: factor out get_tagged_oid()\npack-bitmap.c\ndad3f060 712) object = parse_object_or_die(get_tagged_oid(tag), NULL);\n\nSZEDER Gábor\t2bb74b53 Test the progress display\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\nThomas Gummerer\t34933d0e stash: make sure to write refreshed cache\nbuiltin/stash.c\n34933d0e 1137) ret = -1;\n34933d0e 1138) goto done;\n\nThomas Gummerer\t8e4c8af0 push: disallow --all and refspecs when remote.<name>.mirror is set\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\nThomas Gummerer\t22184497 factor out refresh_and_write_cache function\nbuiltin/am.c\n22184497 1695) die(_(\"unable to write index file\"));\n\nread-cache.c\n22184497 1487) return -1;\n22184497 1491) ret = -1;\n\nTorsten Bögershausen\tebb8d2c9 mingw: support UNC in git clone file://server/share/repo\nconnect.c\nebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n\n\n"},{"id":"384241","messageId":"20191017064644.GA12915@sigill.intra.peff.net","threadId":"52020","inReplyTo":"c863c09b-f0ed-19c6-356e-12a3ecbc08b9@gmail.com","subject":"Re: Git Test Coverage Report (October 11)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-10-17T06:46:44Z","receivedAt":"2019-10-17T06:48:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Oct 11, 2019 at 09:33:11AM -0400, Derrick Stolee wrote:\n\n> Here is today's test coverage report. The usual report format is\n> available online [1], [2]. The report listed below is a new format\n> that groups lines by the commit that introduced them [3]. Thanks\n> Peff for the feedback on that idea.\n\nThanks. FWIW, I did find this one easier to scan through looking for my\nown bits.\n\n-Peff\n"},{"id":"384713","messageId":"20191023170049.hnzb22iiflrigyfs@tb-raspi4","threadId":"52020","inReplyTo":"c863c09b-f0ed-19c6-356e-12a3ecbc08b9@gmail.com","subject":"Re: Git Test Coverage Report (October 11)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-10-23T17:00:49Z","receivedAt":"2019-10-23T17:00:56Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Fri, Oct 11, 2019 at 09:33:11AM -0400, Derrick Stolee wrote:\n> Here is today's test coverage report. The usual report format is\n> available online [1], [2]. The report listed below is a new format\n> that groups lines by the commit that introduced them [3]. Thanks\n> Peff for the feedback on that idea.\n>\n\n[]\n>\n> Torsten Bögershausen\tebb8d2c9 mingw: support UNC in git clone file://server/share/repo\n> connect.c\n> ebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n>\n\nI actually looked into this one, and my understanding is that the code path\nmakes only sense for windows and is only tested on Windows in t5500.\n(Linux/Unix/POSIX don't use UNC path names starting with \"//\" )\n\nHow can we avoid those \"not covered by test\" warnings?\n\nOne solution could be to use\n\n#ifndef has_dos_drive_prefix\n#define has_dos_drive_prefix(a) 0\n#endif\n\nin git-compat-util.h and hope that the compiler is smart enough\nto optimize away that line of code.\n\nAnother way could be to have #ifdefs in connect.c, so that it\nis clear \"this is Windows only\".\n\nOr make a comment for the \"cover report\" saying \"not covered\".\n\nAre there any good or better thoughts on this ?\n\n\n\n\n"},{"id":"384715","messageId":"ebe33082-976d-7146-1450-925e4785faf1@gmail.com","threadId":"52020","inReplyTo":"20191023170049.hnzb22iiflrigyfs@tb-raspi4","subject":"Re: Git Test Coverage Report (October 11)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-10-23T18:07:20Z","receivedAt":"2019-10-23T18:07:24Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 10/23/2019 1:00 PM, Torsten Bögershausen wrote:\n> On Fri, Oct 11, 2019 at 09:33:11AM -0400, Derrick Stolee wrote:\n>> Here is today's test coverage report. The usual report format is\n>> available online [1], [2]. The report listed below is a new format\n>> that groups lines by the commit that introduced them [3]. Thanks\n>> Peff for the feedback on that idea.\n>>\n> \n> []\n>>\n>> Torsten Bögershausen\tebb8d2c9 mingw: support UNC in git clone file://server/share/repo\n>> connect.c\n>> ebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n>>\n> \n> I actually looked into this one, and my understanding is that the code path\n> makes only sense for windows and is only tested on Windows in t5500.\n> (Linux/Unix/POSIX don't use UNC path names starting with \"//\" )\n> \n> How can we avoid those \"not covered by test\" warnings?\n> \n> One solution could be to use\n> \n> #ifndef has_dos_drive_prefix\n> #define has_dos_drive_prefix(a) 0\n> #endif\n> \n> in git-compat-util.h and hope that the compiler is smart enough\n> to optimize away that line of code.\n> \n> Another way could be to have #ifdefs in connect.c, so that it\n> is clear \"this is Windows only\".\n> \n> Or make a comment for the \"cover report\" saying \"not covered\".\n> \n> Are there any good or better thoughts on this ?\n\nOne way to avoid this is to add ignored lines to the test-coverage\nrepo [1]. These only work if the exact contents match on a specific\nline number, but can be a way to stop noise in the short-term.\n\nFor example, I added a few lines to ignore in commit-graph.c [2],\nbut I haven't added ignored lines in a while.\n\nI'm happy to take a PR including the lines you want to ignore, or\nI could take inventory of the lines in the current report before regenerating\na test for -rc1.\n\nThanks,\n-Stolee\n\n[1] https://github.com/derrickstolee/git-test-coverage\n\n[2] https://github.com/derrickstolee/git-test-coverage/blob/master/ignored/commit-graph.c\n"},{"id":"384774","messageId":"20191024152508.a6vr7nh62wsqzy6u@tb-raspi4","threadId":"52020","inReplyTo":"ebe33082-976d-7146-1450-925e4785faf1@gmail.com","subject":"Re: Git Test Coverage Report (October 11)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-10-24T15:25:08Z","receivedAt":"2019-10-24T15:25:18Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Wed, Oct 23, 2019 at 02:07:20PM -0400, Derrick Stolee wrote:\n> On 10/23/2019 1:00 PM, Torsten Bögershausen wrote:\n> > On Fri, Oct 11, 2019 at 09:33:11AM -0400, Derrick Stolee wrote:\n> >> Here is today's test coverage report. The usual report format is\n> >> available online [1], [2]. The report listed below is a new format\n> >> that groups lines by the commit that introduced them [3]. Thanks\n> >> Peff for the feedback on that idea.\n> >>\n> >\n> > []\n> >>\n> >> Torsten Bögershausen\tebb8d2c9 mingw: support UNC in git clone file://server/share/repo\n> >> connect.c\n> >> ebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n> >>\n> >\n> > I actually looked into this one, and my understanding is that the code path\n> > makes only sense for windows and is only tested on Windows in t5500.\n> > (Linux/Unix/POSIX don't use UNC path names starting with \"//\" )\n> >\n> > How can we avoid those \"not covered by test\" warnings?\n> >\n> > One solution could be to use\n> >\n> > #ifndef has_dos_drive_prefix\n> > #define has_dos_drive_prefix(a) 0\n> > #endif\n> >\n> > in git-compat-util.h and hope that the compiler is smart enough\n> > to optimize away that line of code.\n> >\n> > Another way could be to have #ifdefs in connect.c, so that it\n> > is clear \"this is Windows only\".\n> >\n> > Or make a comment for the \"cover report\" saying \"not covered\".\n> >\n> > Are there any good or better thoughts on this ?\n>\n> One way to avoid this is to add ignored lines to the test-coverage\n> repo [1]. These only work if the exact contents match on a specific\n> line number, but can be a way to stop noise in the short-term.\n>\n> For example, I added a few lines to ignore in commit-graph.c [2],\n> but I haven't added ignored lines in a while.\n>\n> I'm happy to take a PR including the lines you want to ignore, or\n> I could take inventory of the lines in the current report before regenerating\n> a test for -rc1.\n>\n> Thanks,\n> -Stolee\n>\n> [1] https://github.com/derrickstolee/git-test-coverage\n>\n> [2] https://github.com/derrickstolee/git-test-coverage/blob/master/ignored/commit-graph.c\n\nI added a PR as suggested.\nOne thing, that came into my mind:\n\nWould it make sense to loosen the condition:\n921:path = host - 2; /* include the leading \"//\" */\n\nRemove the line number:\nhost - 2; /* include the leading \"//\" */\n\nThat would assume, that the line is unique within the file,\n(can be checked with unique) .\nIt can give a more robust handling\nwhen lines are added in the file and file numbers change,\nbut the content is the same.\n"},{"id":"384776","messageId":"b0caf237-6580-0b63-5cad-7b1ecf8a1710@gmail.com","threadId":"52020","inReplyTo":"20191024152508.a6vr7nh62wsqzy6u@tb-raspi4","subject":"Re: Git Test Coverage Report (October 11)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-10-24T17:04:04Z","receivedAt":"2019-10-24T17:04:09Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 10/24/2019 11:25 AM, Torsten Bögershausen wrote:\n> On Wed, Oct 23, 2019 at 02:07:20PM -0400, Derrick Stolee wrote:\n>> On 10/23/2019 1:00 PM, Torsten Bögershausen wrote:\n>>> On Fri, Oct 11, 2019 at 09:33:11AM -0400, Derrick Stolee wrote:\n>>>> Here is today's test coverage report. The usual report format is\n>>>> available online [1], [2]. The report listed below is a new format\n>>>> that groups lines by the commit that introduced them [3]. Thanks\n>>>> Peff for the feedback on that idea.\n>>>>\n>>>\n>>> []\n>>>>\n>>>> Torsten Bögershausen\tebb8d2c9 mingw: support UNC in git clone file://server/share/repo\n>>>> connect.c\n>>>> ebb8d2c9 921) path = host - 2; /* include the leading \"//\" */\n>>>>\n>>>\n>>> I actually looked into this one, and my understanding is that the code path\n>>> makes only sense for windows and is only tested on Windows in t5500.\n>>> (Linux/Unix/POSIX don't use UNC path names starting with \"//\" )\n>>>\n>>> How can we avoid those \"not covered by test\" warnings?\n>>>\n>>> One solution could be to use\n>>>\n>>> #ifndef has_dos_drive_prefix\n>>> #define has_dos_drive_prefix(a) 0\n>>> #endif\n>>>\n>>> in git-compat-util.h and hope that the compiler is smart enough\n>>> to optimize away that line of code.\n>>>\n>>> Another way could be to have #ifdefs in connect.c, so that it\n>>> is clear \"this is Windows only\".\n>>>\n>>> Or make a comment for the \"cover report\" saying \"not covered\".\n>>>\n>>> Are there any good or better thoughts on this ?\n>>\n>> One way to avoid this is to add ignored lines to the test-coverage\n>> repo [1]. These only work if the exact contents match on a specific\n>> line number, but can be a way to stop noise in the short-term.\n>>\n>> For example, I added a few lines to ignore in commit-graph.c [2],\n>> but I haven't added ignored lines in a while.\n>>\n>> I'm happy to take a PR including the lines you want to ignore, or\n>> I could take inventory of the lines in the current report before regenerating\n>> a test for -rc1.\n>>\n>> Thanks,\n>> -Stolee\n>>\n>> [1] https://github.com/derrickstolee/git-test-coverage\n>>\n>> [2] https://github.com/derrickstolee/git-test-coverage/blob/master/ignored/commit-graph.c\n> \n> I added a PR as suggested.\n> One thing, that came into my mind:\n> \n> Would it make sense to loosen the condition:\n> 921:path = host - 2; /* include the leading \"//\" */\n> \n> Remove the line number:\n> host - 2; /* include the leading \"//\" */\n> \n> That would assume, that the line is unique within the file,\n> (can be checked with unique) .\n> It can give a more robust handling\n> when lines are added in the file and file numbers change,\n> but the content is the same.\n\nI'll consider making the line number optional. The reason I put\nthe numbers there was so we could have\n\n\t994:return 1;\n\nand that would check a particular error-check path, but not\nALL places with \"return 1;\".\n\nYour line is particularly unique, so ignoring all lines with\nthat text should be fine.\n\nThanks!\n-Stolee\n\n"}]}