{"thread":{"id":"49853","subject":"Git Test Coverage Report (v2.20.0-rc0)","startedAt":"2018-11-19T02:55:06Z","lastAt":"2018-11-20T20:43:37Z","messageCount":18,"participants":["Derrick Stolee","Jeff King","Ævar Arnfjörð Bjarmason","Jonathan Nieder","Ben Peart","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"363613","messageId":"9e293b1b-1845-1772-409b-031c0bf4d17b@gmail.com","threadId":"49853","inReplyTo":null,"subject":"Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-19T02:54:56Z","receivedAt":"2018-11-19T02:55:06Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"Here is a test coverage report for the uncovered lines introduced in \nv2.20.0-rc0 compared to v2.19.1.\n\nThanks,\n\n-Stolee\n\n[1] https://dev.azure.com/git/git/_build/results?buildId=263&view=logs\n\n---\n\n\napply.c\neccb5a5f3d 4071) return get_oid_hex(p->old_oid_prefix, oid);\n517fe807d6 4776) BUG_ON_OPT_NEG(unset);\n735ca208c5 4830) return -1;\n\nblame.c\na470beea39  113)  !strcmp(r->index->cache[-1 - pos]->name, path))\na470beea39  272) int pos = index_name_pos(r->index, path, len);\na470beea39  274) mode = r->index->cache[pos]->ce_mode;\n\nbuiltin/add.c\nd1664e73ad builtin/add.c 458) die(_(\"index file corrupt\"));\n\nbuiltin/am.c\n2abf350385 1362) repo_init_revisions(the_repository, &rev_info, NULL);\nfce5664805 2117) *opt_value = PATCH_FORMAT_UNKNOWN;\n\nbuiltin/blame.c\n517fe807d6 builtin/blame.c    759) BUG_ON_OPT_NEG(unset);\n\nbuiltin/cat-file.c\n98f425b453 builtin/cat-file.c  56) die(\"unable to stream %s to stdout\", \noid_to_hex(oid));\n0eb8d3767c builtin/cat-file.c 609) return error(_(\"only one batch option \nmay be specified\"));\n\nbuiltin/checkout.c\nfa655d8411 builtin/checkout.c  539) return 0;\nfa655d8411 builtin/checkout.c  953) return error(_(\"index file corrupt\"));\n\nbuiltin/difftool.c\n4a7e27e957 441) if (oideq(&loid, &roid))\n\nbuiltin/fast-export.c\n4a7e27e957 builtin/fast-export.c  387) if (oideq(&ospec->oid, &spec->oid) &&\n\nbuiltin/fetch.c\nbuiltin/fsck.c\nb29759d89a builtin/fsck.c 613) fprintf(stderr, \"Checking %s link\\n\", \nhead_ref_name);\nb29759d89a builtin/fsck.c 618) return error(\"Invalid %s\", head_ref_name);\n454ea2e4d7 builtin/fsck.c 769) for (p = get_all_packs(the_repository); p;\n66ec0390e7 builtin/fsck.c 888) midx_argv[2] = \"--object-dir\";\n66ec0390e7 builtin/fsck.c 889) midx_argv[3] = alt->path;\n66ec0390e7 builtin/fsck.c 890) if (run_command(&midx_verify))\n66ec0390e7 builtin/fsck.c 891) errors_found |= ERROR_COMMIT_GRAPH;\n\nbuiltin/gc.c\n3029970275 builtin/gc.c 461) ret = error_errno(_(\"cannot stat '%s'\"), \ngc_log_path);\n3029970275 builtin/gc.c 470) ret = error_errno(_(\"cannot read '%s'\"), \ngc_log_path);\nfec2ed2187 builtin/gc.c 495) die(FAILED_RUN, pack_refs_cmd.argv[0]);\nfec2ed2187 builtin/gc.c 498) die(FAILED_RUN, reflog.argv[0]);\n3029970275 builtin/gc.c 585) exit(128);\nfec2ed2187 builtin/gc.c 637) die(FAILED_RUN, repack.argv[0]);\nfec2ed2187 builtin/gc.c 647) die(FAILED_RUN, prune.argv[0]);\nfec2ed2187 builtin/gc.c 654) die(FAILED_RUN, prune_worktrees.argv[0]);\nfec2ed2187 builtin/gc.c 658) die(FAILED_RUN, rerere.argv[0]);\n\nbuiltin/grep.c\n76e9bdc437 builtin/grep.c  424) grep_read_unlock();\nfd6263fb73 builtin/grep.c 1051) warning(_(\"invalid option combination, \nignoring --threads\"));\nfd6263fb73 builtin/grep.c 1057) die(_(\"invalid number of threads \nspecified (%d)\"), num_threads);\n\nbuiltin/help.c\ne6e76baaf4 builtin/help.c 429) if (!exclude_guides || alias[0] == '!') {\ne6e76baaf4 builtin/help.c 430) printf_ln(_(\"'%s' is aliased to '%s'\"), \ncmd, alias);\ne6e76baaf4 builtin/help.c 431) free(alias);\ne6e76baaf4 builtin/help.c 432) exit(0);\ne6e76baaf4 builtin/help.c 441) fprintf_ln(stderr, _(\"'%s' is aliased to \n'%s'\"), cmd, alias);\ne6e76baaf4 builtin/help.c 442) count = split_cmdline(alias, &argv);\ne6e76baaf4 builtin/help.c 443) if (count < 0)\ne6e76baaf4 builtin/help.c 444) die(_(\"bad alias.%s string: %s\"), cmd,\ne6e76baaf4 builtin/help.c 446) free(argv);\ne6e76baaf4 builtin/help.c 448) return alias;\n\nbuiltin/log.c\n517fe807d6 builtin/log.c 1196) BUG_ON_OPT_NEG(unset);\n2e6fd71a52 builtin/log.c 1472) die(_(\"failed to infer range-diff ranges\"));\nee6cbf712e builtin/log.c 1818) die(_(\"--interdiff requires \n--cover-letter or single patch\"));\n8631bf1cdd builtin/log.c 1828) else if (!rdiff_prev)\n8631bf1cdd builtin/log.c 1829) die(_(\"--creation-factor requires \n--range-diff\"));\n40ce41604d builtin/log.c 1833) die(_(\"--range-diff requires \n--cover-letter or single patch\"));\n\nbuiltin/multi-pack-index.c\n6d68e6a461 35) usage_with_options(builtin_multi_pack_index_usage,\n6d68e6a461 39) die(_(\"too many arguments\"));\n6d68e6a461 48) die(_(\"unrecognized verb: %s\"), argv[0]);\n\nbuiltin/pack-objects.c\n6a22d52126 builtin/pack-objects.c 1091) continue;\n2fa233a554 builtin/pack-objects.c 1512) hashcpy(base_oid.hash, base_sha1);\n2fa233a554 builtin/pack-objects.c 1513) if \n(!in_same_island(&delta->idx.oid, &base_oid))\n2fa233a554 builtin/pack-objects.c 1514) return 0;\n28b8a73080 builtin/pack-objects.c 2793) depth++;\n108f530385 builtin/pack-objects.c 2797) oe_set_tree_depth(&to_pack, ent, \ndepth);\n454ea2e4d7 builtin/pack-objects.c 2981) p = get_all_packs(the_repository);\n\nbuiltin/pack-redundant.c\n454ea2e4d7 builtin/pack-redundant.c 580) struct packed_git *p = \nget_all_packs(the_repository);\n454ea2e4d7 builtin/pack-redundant.c 595) struct packed_git *p = \nget_all_packs(the_repository);\n\nbuiltin/pull.c\n01a31f3bca 565) die(_(\"unable to access commit %s\"),\n\nbuiltin/rebase--interactive.c\n53bbcfbde7 builtin/rebase--interactive2.c  24) return error(_(\"no HEAD?\"));\n53bbcfbde7 builtin/rebase--interactive2.c  51) return \nerror_errno(_(\"could not create temporary %s\"), path_state_dir());\n53bbcfbde7 builtin/rebase--interactive2.c  57) return \nerror_errno(_(\"could not mark as interactive\"));\n53bbcfbde7 builtin/rebase--interactive2.c  77) return -1;\n53bbcfbde7 builtin/rebase--interactive2.c  81) return -1;\n53bbcfbde7 builtin/rebase--interactive2.c  87) free(revisions);\n53bbcfbde7 builtin/rebase--interactive2.c  88) free(shortrevisions);\n53bbcfbde7 builtin/rebase--interactive2.c  90) return -1;\n53bbcfbde7 builtin/rebase--interactive2.c  98) free(revisions);\n53bbcfbde7 builtin/rebase--interactive2.c  99) free(shortrevisions);\n53bbcfbde7 builtin/rebase--interactive2.c 101) return \nerror_errno(_(\"could not open %s\"), rebase_path_todo());\n53bbcfbde7 builtin/rebase--interactive2.c 106) \nargv_array_push(&make_script_args, restrict_revision);\n53bbcfbde7 builtin/rebase--interactive2.c 114) error(_(\"could not \ngenerate todo list\"));\n53bbcfbde7 builtin/rebase--interactive2.c 206) \nusage_with_options(builtin_rebase_interactive_usage, options);\n53bbcfbde7 builtin/rebase--interactive2.c 220) \nwarning(_(\"--[no-]rebase-cousins has no effect without \"\n0af129b2ed builtin/rebase--interactive2.c 226) die(_(\"a base commit must \nbe provided with --upstream or --onto\"));\n34b47315d9 builtin/rebase--interactive.c  261) ret = rearrange_squash();\n34b47315d9 builtin/rebase--interactive.c  262) break;\n34b47315d9 builtin/rebase--interactive.c  264) ret = \nsequencer_add_exec_commands(cmd);\n34b47315d9 builtin/rebase--interactive.c  265) break;\n\nbuiltin/rebase.c\n62c23938fa   55) return env;\n55071ea248   65) strbuf_trim(&out);\n55071ea248   66) ret = !strcmp(\"true\", out.buf);\n55071ea248   67) strbuf_release(&out);\n002ee2fe68  119) die(_(\"%s requires an interactive rebase\"), option);\nf95736288a  152) return error_errno(_(\"could not read '%s'\"), path);\nf95736288a  166) return -1;\nf95736288a  171) return error(_(\"could not get 'onto': '%s'\"), buf.buf);\nf95736288a  182) return -1;\nf95736288a  183) } else if (read_one(state_dir_path(\"head\", opts), &buf))\nf95736288a  184) return -1;\nf95736288a  186) return error(_(\"invalid orig-head: '%s'\"), buf.buf);\nf95736288a  190) return -1;\nf95736288a  192) opts->flags &= ~REBASE_NO_QUIET;\n73d51ed0a5  200) opts->signoff = 1;\n73d51ed0a5  201) opts->flags |= REBASE_FORCE;\nead98c111b  208) return -1;\n12026a412c  223) return -1;\nba1905a5fe  231) return -1;\nba1905a5fe  239) return -1;\n6defce2b02  259) return error(_(\"Could not read '%s'\"), path);\n6defce2b02  277) res = error(_(\"Cannot store %s\"), autostash.buf);\n6defce2b02  281) return res;\nbc24382c2b  379) argv_array_pushf(&child.args,\nbc24382c2b  381) oid_to_hex(&opts->restrict_revision->object.oid));\nac7f467fef  515) struct strbuf dir = STRBUF_INIT;\n6defce2b02  517) apply_autostash(opts);\nac7f467fef  518) strbuf_addstr(&dir, opts->state_dir);\nac7f467fef  519) remove_dir_recursively(&dir, 0);\nac7f467fef  520) strbuf_release(&dir);\nac7f467fef  521) die(\"Nothing to do\");\n3249c1251e  556) ret = -1;\n3249c1251e  557) goto leave_reset_head;\nbac2a1e36f  561) ret = error(_(\"could not determine HEAD revision\"));\nbac2a1e36f  562) goto leave_reset_head;\n3249c1251e  580) ret = error(_(\"could not read index\"));\n3249c1251e  581) goto leave_reset_head;\nbac2a1e36f  585) ret = error(_(\"failed to find tree of %s\"), \noid_to_hex(oid));\nbac2a1e36f  586) goto leave_reset_head;\n3249c1251e  590) ret = error(_(\"failed to find tree of %s\"), \noid_to_hex(oid));\n3249c1251e  591) goto leave_reset_head;\nac7f467fef  603) ret = error(_(\"could not write index\"));\n3249c1251e  604) goto leave_reset_head;\nac7f467fef  621) } else if (old_orig)\nac7f467fef  622) delete_ref(NULL, \"ORIG_HEAD\", old_orig, 0);\nbff014dac7  655) opts->flags &= !REBASE_DIFFSTAT;\n9a48a615b4  689) return 1;\n9a48a615b4  705) return 0;\n55071ea248  916) const char *path = mkpath(\"%s/git-legacy-rebase\",\n55071ea248  919) if (sane_execvp(path, (char **)argv) < 0)\n55071ea248  920) die_errno(_(\"could not exec %s\"), path);\n0eabf4b95c  938) die(_(\"It looks like 'git am' is in progress. Cannot \nrebase.\"));\nf28d40d3a9  975) usage_with_options(builtin_rebase_usage,\nf95736288a  995) die(_(\"Cannot read HEAD\"));\nf95736288a  999) die(_(\"could not read index\"));\nf95736288a 1013) exit(1);\n122420c295 1026) die(_(\"could not discard worktree changes\"));\n122420c295 1029) exit(1);\n5e5d96197c 1040) exit(1);\n5e5d96197c 1044) die(_(\"could not move back to %s\"),\n5a61494539 1055) die(_(\"could not remove '%s'\"), options.state_dir);\nc54dacb50e 1074) const char *last_slash = strrchr(options.state_dir, '/');\nc54dacb50e 1075) const char *state_dir_base =\nc54dacb50e 1076) last_slash ? last_slash + 1 : options.state_dir;\nc54dacb50e 1077) const char *cmd_live_rebase =\nc54dacb50e 1079) strbuf_reset(&buf);\nc54dacb50e 1080) strbuf_addf(&buf, \"rm -fr \\\"%s\\\"\", options.state_dir);\nc54dacb50e 1081) die(_(\"It seems that there is already a %s directory, \nand\\n\"\n3c3588c7d3 1138) else if (strcmp(\"no-rebase-cousins\", rebase_merges))\n3c3588c7d3 1139) die(_(\"Unknown mode: %s\"), rebase_merges);\nba1905a5fe 1161) die(_(\"--strategy requires --merge or --interactive\"));\ncda614e489 1179) strbuf_addstr(&options.git_format_patch_opt, \" \n--progress\");\nac7f467fef 1188) options.state_dir = apply_dir();\nac7f467fef 1189) break;\nac7f467fef 1261) die(_(\"invalid upstream '%s'\"), options.upstream_name);\n9dba809a69 1267) die(_(\"Could not create new root commit\"));\ne65123a71d 1317) die(_(\"fatal: no such branch/commit '%s'\"),\nac7f467fef 1325) die(_(\"No such ref: %s\"), \"HEAD\");\nac7f467fef 1337) die(_(\"Could not resolve HEAD to a revision\"));\ne0333e5c63 1350) die(_(\"could not read index\"));\n6defce2b02 1377) die(_(\"Cannot autostash\"));\n6defce2b02 1380) die(_(\"Unexpected stash response: '%s'\"),\n6defce2b02 1386) die(_(\"Could not create directory for '%s'\"),\n6defce2b02 1392) die(_(\"could not reset --hard\"));\ne65123a71d 1436) ret = !!error(_(\"could not parse '%s'\"),\ne65123a71d 1438) goto cleanup;\ne65123a71d 1447) ret = !!error(_(\"could not switch to \"\n1ed9c14ff2 1457)  resolve_ref_unsafe(\"HEAD\", 0, NULL, &flag))\n1ed9c14ff2 1458) puts(_(\"HEAD is up to date.\"));\n9a48a615b4 1467)  resolve_ref_unsafe(\"HEAD\", 0, NULL, &flag))\n9a48a615b4 1468) puts(_(\"HEAD is up to date, rebase forced.\"));\n\nbuiltin/reflog.c\nc9ef0d95eb builtin/reflog.c 580) all_worktrees = 0;\nc9ef0d95eb builtin/reflog.c 616) continue;\n\nbuiltin/remote.c\n5025425dff builtin/remote.c  864) return error(_(\"No such remote: \n'%s'\"), name);\n\nbuiltin/repack.c\n16d75fa48d  48) use_delta_islands = git_config_bool(var, value);\n16d75fa48d  49) return 0;\n2f0c9e9a9b 239) die(\"repack: Expecting full hex object ID lines only \nfrom pack-objects.\");\n2f0c9e9a9b 411) die(\"repack: Expecting full hex object ID lines only \nfrom pack-objects.\");\n\nbuiltin/rerere.c\n2373b65059 builtin/rerere.c  79) warning(_(\"'git rerere forget' without \npaths is deprecated\"));\n2373b65059 builtin/rerere.c 111) die(_(\"unable to generate diff for \n'%s'\"), rerere_path(id, NULL));\n\nbuiltin/rev-list.c\n7c0fe330d5 builtin/rev-list.c 227) die(\"unexpected missing %s object '%s'\",\n7c0fe330d5 builtin/rev-list.c 228)     type_name(obj->type), \noid_to_hex(&obj->oid));\n\nbuiltin/show-branch.c\n9001dc2a74 builtin/show-branch.c 430) if (get_oid(refname + ofs, &tmp) \n|| !oideq(&tmp, oid))\n517fe807d6 builtin/show-branch.c 607) BUG_ON_OPT_NEG(unset);\n\nbuiltin/show-ref.c\n517fe807d6 builtin/show-ref.c 154) BUG_ON_OPT_NEG(unset);\n\nbuiltin/submodule--helper.c\nee69b2a90c 1469) die(_(\"Invalid update mode '%s' for submodule path '%s'\"),\nee69b2a90c 1473) die(_(\"Invalid update mode '%s' configured for \nsubmodule path '%s'\"),\nee69b2a90c 1476) out->type = sub->update_strategy.type;\nee69b2a90c 1477) out->command = sub->update_strategy.command;\nee69b2a90c 1497) die(\"submodule--helper update-module-clone expects \n<just-cloned> <path> [<update>]\");\ne0a862fdaf 1648) url = sub->url;\n74d4731da1 2057) die(_(\"could not get a repository handle for submodule \n'%s'\"), path);\n\nbuiltin/unpack-objects.c\n4a7e27e957 builtin/unpack-objects.c 306) if (oideq(&info->base_oid, \n&obj_list[nr].oid) ||\n\nbuiltin/update-index.c\n4a7e27e957 builtin/update-index.c  672) if (oideq(&ce_2->oid, &ce_3->oid) &&\n\nbuiltin/worktree.c\ne5353bef55  60) error_errno(_(\"failed to delete '%s'\"), sb.buf);\ne19831c94f 251)     die(_(\"unable to re-add worktree '%s'\"), path);\n68a6b3a1bd 793) die(_(\"cannot move a locked working tree, lock reason: \n%s\\nuse 'move -f -f' to override or unlock first\"),\nf4143101cb 906) die(_(\"cannot remove a locked working tree, lock reason: \n%s\\nuse 'remove -f -f' to override or unlock first\"),\n\nbundle.c\n2c8ee1f53c 267) error_errno(_(\"unable to dup bundle descriptor\"));\n2c8ee1f53c 268) child_process_clear(&pack_objects);\n2c8ee1f53c 269) return -1;\n2c8ee1f53c 478) rollback_lock_file(&lock);\n\ncache-tree.c\ncombine-diff.c\n0074c9110d  377) state->sline[state->nb-1].p_lno =\n0074c9110d  378) xcalloc(state->num_parent, sizeof(unsigned long));\n\ncommit-graph.c\n20fd6d5799   79) return 0;\n6cc017431c  275) return 0;\n\ncommit-reach.c\n5227c38566 134) return ret;\n5227c38566 282) return 1;\n5227c38566 314) return ret;\n5227c38566 317) return ret;\n1d614d41e5 395) return 0;\n1d614d41e5 401) return 0;\n1d614d41e5 405) return 0;\n4fbcca4eff 538) return 1;\nb67f6b26e3 559) continue;\nb67f6b26e3 570) from->objects[i].item->flags |= assign_flag;\nb67f6b26e3 571) continue;\nb67f6b26e3 577) result = 0;\nb67f6b26e3 578) goto cleanup;\n\nconfig.c\nc780b9cfe8 2303) return val;\nc780b9cfe8 2306) if (is_bool)\nc780b9cfe8 2307) return val ? 0 : 1;\nc780b9cfe8 2309) return val;\n\ndate.c\nc27cc94fad  904) tm->tm_mon = number-1;\nc27cc94fad  908) else if (number > 69 && number < 100)\nc27cc94fad  909) tm->tm_year = number;\nc27cc94fad  910) else if (number < 38)\nc27cc94fad  911) tm->tm_year = 100 + number;\nc27cc94fad  952) pending_number(tm, num);\n\ndelta-islands.c\nc8d521faf7  53) memcpy(b, old, size);\nc8d521faf7  73) return 1;\nc8d521faf7 118) return 0;\nc8d521faf7 130) return 0;\nc8d521faf7 187) b->refcount--;\nc8d521faf7 188) b = kh_value(island_marks, pos) = island_bitmap_new(b);\nc8d521faf7 202) continue;\nc8d521faf7 212) obj = ((struct tag *)obj)->tagged;\nc8d521faf7 213) if (obj) {\nc8d521faf7 214) parse_object(the_repository, &obj->oid);\nc8d521faf7 215) marks = create_or_get_island_marks(obj);\nc8d521faf7 216) island_bitmap_set(marks, island_counter);\nc8d521faf7 248) return;\nc8d521faf7 268) progress_state = start_progress(_(\"Propagating island \nmarks\"), nr);\nc8d521faf7 286) die(_(\"bad tree object %s\"), oid_to_hex(&ent->idx.oid));\nc8d521faf7 293) continue;\nc8d521faf7 297) continue;\nc8d521faf7 321) return config_error_nonbool(k);\nc8d521faf7 330) die(_(\"failed to load island regex for '%s': %s\"), k, \nre.buf);\nc8d521faf7 386) warning(_(\"island regex from config has \"\nc8d521faf7 397) strbuf_addch(&island_name, '-');\nc8d521faf7 433) continue;\nc8d521faf7 436) list[dst] = list[src];\n\ndiff-lib.c\n9001dc2a74 diff-lib.c 346)     (!oideq(oid, &old_entry->oid) || \n!oideq(&old_entry->oid, &new_entry->oid))) {\n\ndiff.c\nb78ea5fc35 4130) add_external_diff_name(o->repo, &argv, other, two);\n\ndir.c\n8a2c174677  287) name = to_free = xmemdupz(name, namelen);\nc46c406ae1 2282) trace_performance_leave(\"read directory %.*s\", len, path);\n\nentry.c\nb878579ae7 402) static void mark_colliding_entries(const struct checkout \n*state,\nb878579ae7 405) int i, trust_ino = check_stat;\nb878579ae7 411) ce->ce_flags |= CE_MATCHED;\nb878579ae7 413) for (i = 0; i < state->istate->cache_nr; i++) {\nb878579ae7 414) struct cache_entry *dup = state->istate->cache[i];\nb878579ae7 416) if (dup == ce)\nb878579ae7 417) break;\nb878579ae7 419) if (dup->ce_flags & (CE_MATCHED | CE_VALID | \nCE_SKIP_WORKTREE))\nb878579ae7 420) continue;\nb878579ae7 422) if ((trust_ino && dup->ce_stat_data.sd_ino == st->st_ino) ||\nb878579ae7 423)     (!trust_ino && !fspathcmp(ce->name, dup->name))) {\nb878579ae7 424) dup->ce_flags |= CE_MATCHED;\nb878579ae7 425) break;\nb878579ae7 428) }\nb878579ae7 488) mark_colliding_entries(state, ce, &st);\n\nfsck.c\nfb8952077d  214) die_errno(\"Could not read '%s'\", path);\n\ngit.c\na9a60b94cc 322) fprintf_ln(stderr, _(\"'%s' is aliased to '%s'\"),\nc6d75bc17a 735) string_list_clear(&cmd_list, 0);\n\ngpg-interface.c\n4de9394dcb 155) break;\n\nhelp.c\n26c7d06783 help.c         500) static int get_alias(const char *var, \nconst char *value, void *data)\n26c7d06783 help.c         502) struct string_list *list = data;\n26c7d06783 help.c         504) if (skip_prefix(var, \"alias.\", &var))\n26c7d06783 help.c         505) string_list_append(list, var)->util = \nxstrdup(value);\n26c7d06783 help.c         507) return 0;\n26c7d06783 help.c         530) printf(\"\\n%s\\n\", _(\"Command aliases\"));\n26c7d06783 help.c         531) ALLOC_ARRAY(aliases, alias_list.nr + 1);\n26c7d06783 help.c         532) for (i = 0; i < alias_list.nr; i++) {\n26c7d06783 help.c         533) aliases[i].name = alias_list.items[i].string;\n26c7d06783 help.c         534) aliases[i].help = alias_list.items[i].util;\n26c7d06783 help.c         535) aliases[i].category = 1;\n26c7d06783 help.c         537) aliases[alias_list.nr].name = NULL;\n26c7d06783 help.c         538) print_command_list(aliases, 1, longest);\n26c7d06783 help.c         539) free(aliases);\n\nhttp.c\n21084e84a4  316) free(http_ssl_backend);\n21084e84a4  317) http_ssl_backend = xstrdup_or_null(value);\n21084e84a4  318) return 0;\n93aef7c79b  322) http_schannel_check_revoke = git_config_bool(var, value);\n93aef7c79b  323) return 0;\nb67d40adbb  327) http_schannel_use_ssl_cainfo = git_config_bool(var, value);\nb67d40adbb  328) return 0;\n93aef7c79b  833)     !http_schannel_check_revoke) {\n93aef7c79b  835) curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, \nCURLSSLOPT_NO_REVOKE);\nb67d40adbb  883)     !http_schannel_use_ssl_cainfo) {\nb67d40adbb  884) curl_easy_setopt(result, CURLOPT_CAINFO, NULL);\n\nident.c\n501afcb8b0 172) strbuf_addstr(&git_default_email, email);\n501afcb8b0 173) free((char *)email);\n\nlist-objects-filter-options.c\nbc5975d24f  55) if (errbuf) {\nbc5975d24f  56) strbuf_addstr(\nbc5975d24f  60) return 1;\ncc0b05a4cc  86) if (errbuf)\n\nlist-objects-filter.c\nlist-objects.c\nf447a499db 200) ctx->show_object(obj, base->buf, ctx->show_data);\n\nll-merge.c\nd64324cb60 380) marker_size = DEFAULT_CONFLICT_MARKER_SIZE;\n\nlog-tree.c\n4a7e27e957 477) if (oideq(&parent->item->object.oid, oid))\n\nmailinfo.c\n3aa4d81f88  992) len--;\n3aa4d81f88  998) handle_filter(mi, prev);\n3aa4d81f88  999) strbuf_reset(prev);\n3aa4d81f88 1090) handle_filter(mi, &prev);\n\nmidx.c\n4d80560c54   58) error_errno(_(\"failed to read %s\"), midx_name);\n4d80560c54   59) goto cleanup_fail;\n4d80560c54   65) error(_(\"multi-pack-index file %s is too small\"), \nmidx_name);\n4d80560c54   66) goto cleanup_fail;\n0d5b3a5ef7  146) die(_(\"multi-pack-index missing required OID lookup \nchunk\"));\n662148c435  148) die(_(\"multi-pack-index missing required object offsets \nchunk\"));\n4d80560c54  173) munmap(midx_map, midx_size);\n4d80560c54  175) close(fd);\n1dcd9f2043  184) return;\n3715a6335c  266) return 0;\nfe1ed56f5e  413) warning(_(\"failed to open pack-index '%s'\"),\nfe1ed56f5e  415) close_pack(packs->list[packs->nr]);\nfe1ed56f5e  416) FREE_AND_NULL(packs->list[packs->nr]);\nfe1ed56f5e  417) return;\na40498a126  490) return 1;\nfe1ed56f5e  507) die(_(\"failed to locate object %d in packfile\"), \ncur_object);\nfc59e74844  769) die_errno(_(\"unable to create leading directories of %s\"),\n525e18c04b  943) die(_(\"failed to clear multi-pack-index at %s\"), midx);\n56ee7ff156  969) return 0;\ncc6af73c02 1010) midx_report(_(\"failed to load pack-index for packfile %s\"),\ncc6af73c02 1011)     e.p->pack_name);\ncc6af73c02 1012) break;\n\nname-hash.c\n2179045fd0 532) die(_(\"unable to create lazy_dir thread: %s\"), \nstrerror(err));\n2179045fd0 554) die(_(\"unable to create lazy_name thread: %s\"), \nstrerror(err));\n2179045fd0 560) die(_(\"unable to join lazy_name thread: %s\"), \nstrerror(err));\n\noidmap.c\ncc00e5ce6b 11) return !oideq(&entry_->oid,\n\noidset.c\n8b2f8cbcb1 29) kh_del_oid(&set->set, pos);\n8b2f8cbcb1 30) return 1;\n\npack-bitmap.c\n30cdc33fba 1130) return 0;\n\npack-objects.c\n108f530385 172) REALLOC_ARRAY(pdata->tree_depth, pdata->nr_alloc);\nfe0ac2fb7f 175) REALLOC_ARRAY(pdata->layer, pdata->nr_alloc);\n108f530385 192) pdata->tree_depth[pdata->nr_objects - 1] = 0;\nfe0ac2fb7f 195) pdata->layer[pdata->nr_objects - 1] = 0;\n\npackfile.c\n1127a98cce  117) return error(\"index file %s is too small\", path);\n1127a98cce  119) return error(\"empty data\");\nfe1ed56f5e  211) if (open_pack_index(p))\nfe1ed56f5e  212) return 0;\nfe1ed56f5e  213) level1_ofs = p->index_data;\n17c35c8969  490) break;\n17c35c8969  548) return 0;\n\npreload-index.c\nae9af12287  63) struct progress_data *pd = p->progress;\nae9af12287  65) pthread_mutex_lock(&pd->mutex);\nae9af12287  66) pd->n += last_nr - nr;\nae9af12287  67) display_progress(pd->progress, pd->n);\nae9af12287  68) pthread_mutex_unlock(&pd->mutex);\nae9af12287  69) last_nr = nr;\nae9af12287  83) struct progress_data *pd = p->progress;\nae9af12287  85) pthread_mutex_lock(&pd->mutex);\nae9af12287  86) display_progress(pd->progress, pd->n + last_nr);\nae9af12287  87) pthread_mutex_unlock(&pd->mutex);\nae9af12287 118) pd.progress = start_delayed_progress(_(\"Refreshing \nindex\"), index->cache_nr);\nae9af12287 119) pthread_mutex_init(&pd.mutex, NULL);\nae9af12287 132) p->progress = &pd;\n2179045fd0 137) die(_(\"unable to create threaded lstat: %s\"), \nstrerror(err));\n\nread-cache.c\nae9af12287 1490) progress = start_delayed_progress(_(\"Refresh index\"),\nae9af12287 1491)   istate->cache_nr);\nae9af12287 1539) display_progress(progress, i);\nae9af12287 1572) display_progress(progress, istate->cache_nr);\nae9af12287 1573) stop_progress(&progress);\n252d079cbd 1784) const unsigned char *cp = (const unsigned char *)name;\n252d079cbd 1788) strip_len = decode_varint(&cp);\n77ff1127a4 1789) if (previous_ce) {\n77ff1127a4 1790) previous_len = previous_ce->ce_namelen;\n77ff1127a4 1791) if (previous_len < strip_len)\n252d079cbd 1792) die(_(\"malformed name field in the index, near path '%s'\"),\n77ff1127a4 1793) previous_ce->name);\n77ff1127a4 1794) copy_len = previous_len - strip_len;\n252d079cbd 1796) name = (const char *)cp;\n252d079cbd 1802) len += copy_len;\n252d079cbd 1823) if (copy_len)\n252d079cbd 1824) memcpy(ce->name, previous_ce->name, copy_len);\n252d079cbd 1825) memcpy(ce->name + copy_len, name, len + 1 - copy_len);\n252d079cbd 1826) *ent_size = (name - ((char *)ondisk)) + len + 1 - copy_len;\nabb4bb8384 1959) munmap((void *)p->mmap, p->mmap_size);\nabb4bb8384 1960) die(_(\"index file corrupt\"));\n77ff1127a4 2001) mem_pool_init(&istate->ce_mem_pool,\n77ff1127a4 2039) static void *load_cache_entries_thread(void *_data)\n77ff1127a4 2041) struct load_cache_entries_thread_data *p = _data;\n77ff1127a4 2045) for (i = p->ieot_start; i < p->ieot_start + \np->ieot_blocks; i++) {\n77ff1127a4 2046) p->consumed += load_cache_entry_block(p->istate, \np->ce_mem_pool,\n77ff1127a4 2047) p->offset, p->ieot->entries[i].nr, p->mmap, \np->ieot->entries[i].offset, NULL);\n77ff1127a4 2048) p->offset += p->ieot->entries[i].nr;\n77ff1127a4 2050) return NULL;\n77ff1127a4 2053) static unsigned long load_cache_entries_threaded(struct \nindex_state *istate, const char *mmap, size_t mmap_size,\n77ff1127a4 2058) unsigned long consumed = 0;\n77ff1127a4 2061) if (istate->name_hash_initialized)\n77ff1127a4 2064) mem_pool_init(&istate->ce_mem_pool, 0);\n77ff1127a4 2067) if (nr_threads > ieot->nr)\n77ff1127a4 2068) nr_threads = ieot->nr;\n77ff1127a4 2069) data = xcalloc(nr_threads, sizeof(*data));\n77ff1127a4 2071) offset = ieot_start = 0;\n77ff1127a4 2072) ieot_blocks = DIV_ROUND_UP(ieot->nr, nr_threads);\n77ff1127a4 2073) for (i = 0; i < nr_threads; i++) {\n77ff1127a4 2074) struct load_cache_entries_thread_data *p = &data[i];\n77ff1127a4 2077) if (ieot_start + ieot_blocks > ieot->nr)\n77ff1127a4 2078) ieot_blocks = ieot->nr - ieot_start;\n77ff1127a4 2080) p->istate = istate;\n77ff1127a4 2081) p->offset = offset;\n77ff1127a4 2082) p->mmap = mmap;\n77ff1127a4 2083) p->ieot = ieot;\n77ff1127a4 2084) p->ieot_start = ieot_start;\n77ff1127a4 2085) p->ieot_blocks = ieot_blocks;\n77ff1127a4 2088) nr = 0;\n77ff1127a4 2089) for (j = p->ieot_start; j < p->ieot_start + \np->ieot_blocks; j++)\n77ff1127a4 2090) nr += p->ieot->entries[j].nr;\n77ff1127a4 2091) if (istate->version == 4) {\n77ff1127a4 2092) mem_pool_init(&p->ce_mem_pool,\n77ff1127a4 2095) mem_pool_init(&p->ce_mem_pool,\n77ff1127a4 2099) err = pthread_create(&p->pthread, NULL, \nload_cache_entries_thread, p);\n77ff1127a4 2100) if (err)\n77ff1127a4 2101) die(_(\"unable to create load_cache_entries thread: \n%s\"), strerror(err));\n77ff1127a4 2104) for (j = 0; j < ieot_blocks; j++)\n77ff1127a4 2105) offset += ieot->entries[ieot_start + j].nr;\n77ff1127a4 2106) ieot_start += ieot_blocks;\n77ff1127a4 2109) for (i = 0; i < nr_threads; i++) {\n77ff1127a4 2110) struct load_cache_entries_thread_data *p = &data[i];\n77ff1127a4 2112) err = pthread_join(p->pthread, NULL);\n77ff1127a4 2113) if (err)\n77ff1127a4 2114) die(_(\"unable to join load_cache_entries thread: %s\"), \nstrerror(err));\n77ff1127a4 2115) mem_pool_combine(istate->ce_mem_pool, p->ce_mem_pool);\n77ff1127a4 2116) consumed += p->consumed;\n77ff1127a4 2119) free(data);\n77ff1127a4 2121) return consumed;\nabb4bb8384 2193) extension_offset = read_eoie_extension(mmap, mmap_size);\nabb4bb8384 2194) if (extension_offset) {\nabb4bb8384 2197) p.src_offset = extension_offset;\nabb4bb8384 2198) err = pthread_create(&p.pthread, NULL, \nload_index_extensions, &p);\nabb4bb8384 2199) if (err)\nabb4bb8384 2200) die(_(\"unable to create load_index_extensions thread: \n%s\"), strerror(err));\nabb4bb8384 2202) nr_threads--;\n77ff1127a4 2211) ieot = read_ieot_extension(mmap, mmap_size, \nextension_offset);\n77ff1127a4 2214) src_offset += load_cache_entries_threaded(istate, mmap, \nmmap_size, src_offset, nr_threads, ieot);\n77ff1127a4 2215) free(ieot);\nabb4bb8384 2225) int ret = pthread_join(p.pthread, NULL);\nabb4bb8384 2226) if (ret)\nabb4bb8384 2227) die(_(\"unable to join load_index_extensions thread: \n%s\"), strerror(ret));\n3255089ada 2769) ieot_blocks = nr_threads;\n77ff1127a4 2770) if (ieot_blocks > istate->cache_nr)\n77ff1127a4 2771) ieot_blocks = istate->cache_nr;\n3255089ada 2779) ieot = xcalloc(1, sizeof(struct index_entry_offset_table)\n3255089ada 2780) + (ieot_blocks * sizeof(struct index_entry_offset)));\n77ff1127a4 2781) ieot_entries = DIV_ROUND_UP(entries, ieot_blocks);\n3255089ada 2787) free(ieot);\n3b1d9e045e 2788) return -1;\n3255089ada 2814) ieot->entries[ieot->nr].nr = nr;\n3255089ada 2815) ieot->entries[ieot->nr].offset = offset;\n3255089ada 2816) ieot->nr++;\n3255089ada 2822) if (previous_name)\n3255089ada 2823) previous_name->buf[0] = 0;\n3255089ada 2824) nr = 0;\n3255089ada 2825) offset = lseek(newfd, 0, SEEK_CUR);\n3255089ada 2826) if (offset < 0) {\n3255089ada 2827) free(ieot);\n3255089ada 2828) return -1;\n3255089ada 2830) offset += write_buffer_len;\n3255089ada 2840) ieot->entries[ieot->nr].nr = nr;\n3255089ada 2841) ieot->entries[ieot->nr].offset = offset;\n3255089ada 2842) ieot->nr++;\n3255089ada 2854) free(ieot);\n3b1d9e045e 2855) return -1;\n3255089ada 2868) struct strbuf sb = STRBUF_INIT;\n3255089ada 2870) write_ieot_extension(&sb, ieot);\n3255089ada 2871) err = write_index_ext_header(&c, &eoie_c, newfd, \nCACHE_EXT_INDEXENTRYOFFSETTABLE, sb.len) < 0\n3255089ada 2872) || ce_write(&c, newfd, sb.buf, sb.len) < 0;\n3255089ada 2873) strbuf_release(&sb);\n3255089ada 2874) free(ieot);\n3255089ada 2875) if (err)\n3255089ada 2876) return -1;\n3b1d9e045e 3363) static size_t read_eoie_extension(const char *mmap, \nsize_t mmap_size)\n3b1d9e045e 3381) if (mmap_size < sizeof(struct cache_header) + \nEOIE_SIZE_WITH_HEADER + the_hash_algo->rawsz)\n3b1d9e045e 3382) return 0;\n3b1d9e045e 3385) index = eoie = mmap + mmap_size - EOIE_SIZE_WITH_HEADER \n- the_hash_algo->rawsz;\n3b1d9e045e 3386) if (CACHE_EXT(index) != CACHE_EXT_ENDOFINDEXENTRIES)\n3b1d9e045e 3387) return 0;\n3b1d9e045e 3388) index += sizeof(uint32_t);\n3b1d9e045e 3391) extsize = get_be32(index);\n3b1d9e045e 3392) if (extsize != EOIE_SIZE)\n3b1d9e045e 3393) return 0;\n3b1d9e045e 3394) index += sizeof(uint32_t);\n3b1d9e045e 3400) offset = get_be32(index);\n3b1d9e045e 3401) if (mmap + offset < mmap + sizeof(struct cache_header))\n3b1d9e045e 3402) return 0;\n3b1d9e045e 3403) if (mmap + offset >= eoie)\n3b1d9e045e 3404) return 0;\n3b1d9e045e 3405) index += sizeof(uint32_t);\n3b1d9e045e 3416) src_offset = offset;\n3b1d9e045e 3417) the_hash_algo->init_fn(&c);\n3b1d9e045e 3418) while (src_offset < mmap_size - the_hash_algo->rawsz - \nEOIE_SIZE_WITH_HEADER) {\n3b1d9e045e 3426) memcpy(&extsize, mmap + src_offset + 4, 4);\n3b1d9e045e 3427) extsize = ntohl(extsize);\n3b1d9e045e 3430) if (src_offset + 8 + extsize < src_offset)\n3b1d9e045e 3431) return 0;\n3b1d9e045e 3433) the_hash_algo->update_fn(&c, mmap + src_offset, 8);\n3b1d9e045e 3435) src_offset += 8;\n3b1d9e045e 3436) src_offset += extsize;\n3b1d9e045e 3438) the_hash_algo->final_fn(hash, &c);\n3b1d9e045e 3439) if (!hasheq(hash, (const unsigned char *)index))\n3b1d9e045e 3440) return 0;\n3b1d9e045e 3443) if (src_offset != mmap_size - the_hash_algo->rawsz - \nEOIE_SIZE_WITH_HEADER)\n3b1d9e045e 3444) return 0;\n3b1d9e045e 3446) return offset;\n3255089ada 3465) static struct index_entry_offset_table \n*read_ieot_extension(const char *mmap, size_t mmap_size, size_t offset)\n3255089ada 3467)        const char *index = NULL;\n3255089ada 3473)        if (!offset)\n3255089ada 3474)        return NULL;\n3255089ada 3475)        while (offset <= mmap_size - \nthe_hash_algo->rawsz - 8) {\n3255089ada 3476)        extsize = get_be32(mmap + offset + 4);\n3255089ada 3477)        if (CACHE_EXT((mmap + offset)) == \nCACHE_EXT_INDEXENTRYOFFSETTABLE) {\n3255089ada 3478)        index = mmap + offset + 4 + 4;\n3255089ada 3479)        break;\n3255089ada 3481)        offset += 8;\n3255089ada 3482)        offset += extsize;\n3255089ada 3484)        if (!index)\n3255089ada 3485)        return NULL;\n3255089ada 3488)        ext_version = get_be32(index);\n3255089ada 3489)        if (ext_version != IEOT_VERSION) {\n3255089ada 3490)        error(\"invalid IEOT version %d\", ext_version);\n3255089ada 3491)        return NULL;\n3255089ada 3493)        index += sizeof(uint32_t);\n3255089ada 3496)        nr = (extsize - sizeof(uint32_t)) / \n(sizeof(uint32_t) + sizeof(uint32_t));\n3255089ada 3497)        if (!nr) {\n3255089ada 3498)        error(\"invalid number of IEOT entries %d\", nr);\n3255089ada 3499)        return NULL;\n3255089ada 3501)        ieot = xmalloc(sizeof(struct \nindex_entry_offset_table)\n3255089ada 3502)        + (nr * sizeof(struct index_entry_offset)));\n3255089ada 3503)        ieot->nr = nr;\n3255089ada 3504)        for (i = 0; i < nr; i++) {\n3255089ada 3505)        ieot->entries[i].offset = get_be32(index);\n3255089ada 3506)        index += sizeof(uint32_t);\n3255089ada 3507)        ieot->entries[i].nr = get_be32(index);\n3255089ada 3508)        index += sizeof(uint32_t);\n3255089ada 3511)        return ieot;\n3255089ada 3514) static void write_ieot_extension(struct strbuf *sb, \nstruct index_entry_offset_table *ieot)\n3255089ada 3520)        put_be32(&buffer, IEOT_VERSION);\n3255089ada 3521)        strbuf_add(sb, &buffer, sizeof(uint32_t));\n3255089ada 3524)        for (i = 0; i < ieot->nr; i++) {\n3255089ada 3527)        put_be32(&buffer, ieot->entries[i].offset);\n3255089ada 3528)        strbuf_add(sb, &buffer, sizeof(uint32_t));\n3255089ada 3531)        put_be32(&buffer, ieot->entries[i].nr);\n3255089ada 3532)        strbuf_add(sb, &buffer, sizeof(uint32_t));\n3255089ada 3534) }\n\nrebase-interactive.c\n64a43cbd5d 62) return error_errno(_(\"could not read '%s'.\"), todo_file);\n64a43cbd5d 66) strbuf_release(&buf);\n64a43cbd5d 67) return -1;\na9f5476fbc 75) return error_errno(_(\"could not read '%s'.\"), todo_file);\na9f5476fbc 79) strbuf_release(&buf);\na9f5476fbc 80) return -1;\n64a43cbd5d 86) return -1;\n\nref-filter.c\nf0062d3b74 1039) v->s = xstrdup(\"\");\nf0062d3b74 1302) free((char *)to_free);\nf0062d3b74 1303) return xstrdup(\"\");\nf0062d3b74 1340) free((char *)to_free);\nf0062d3b74 1341) return xstrdup(\"\");\nf0062d3b74 1391) *s = xstrdup(\"=\");\nf0062d3b74 1393) *s = xstrdup(\"<\");\nf0062d3b74 1518) ref->symref = xstrdup(\"\");\nf0062d3b74 1587) v->s = xstrdup(\"\");\n\nrefs.c\n3a3b9d8cde  661) return 0;\n4a6067cda5 1431) return 0;\n\nrefs/files-backend.c\nrefs/packed-backend.c\n9001dc2a74 1163) } else if (!oideq(&update->old_oid, iter->oid)) {\n\nrefs/ref-cache.c\n9001dc2a74 275) if (!oideq(&ref1->u.value.oid, &ref2->u.value.oid))\n\nremote.c\n85daa01f6b 1219) continue;\n85daa01f6b 1225) continue;\n\nrerere.c\n2373b65059  217) die(_(\"corrupt MERGE_RR\"));\n2373b65059  226) die(_(\"corrupt MERGE_RR\"));\n2373b65059  229) die(_(\"corrupt MERGE_RR\"));\n2373b65059  264) die(_(\"unable to write rerere record\"));\n2373b65059  269) die(_(\"unable to write rerere record\"));\n4af32207bc  376) break;\n4af32207bc  380) strbuf_addbuf(&two, &conflict);\nc0f16f8e14  384) break;\nc0f16f8e14  388) break;\nc0f16f8e14  392) break;\n2373b65059  480) return error_errno(_(\"could not open '%s'\"), path);\n2373b65059  485) error_errno(_(\"could not write '%s'\"), output);\n2373b65059  495) error(_(\"there were errors while writing '%s' (%s)\"),\n2373b65059  498) io.io.wrerror = error_errno(_(\"failed to flush '%s'\"), \npath);\n2373b65059  565) return error(_(\"index file corrupt\"));\n2373b65059  599) return error(_(\"index file corrupt\"));\n2373b65059  684) warning_errno(_(\"failed utime() on '%s'\"),\n2373b65059  690) return error_errno(_(\"could not open '%s'\"), path);\n2373b65059  692) error_errno(_(\"could not write '%s'\"), path);\n2373b65059  694) return error_errno(_(\"writing '%s' failed\"), path);\n2373b65059  720) die(_(\"unable to write new index file\"));\n2373b65059  803) die_errno(_(\"cannot unlink stray '%s'\"), path);\n2373b65059 1057) error(_(\"failed to update conflicted state in '%s'\"), \npath);\n2373b65059 1075) error(_(\"no remembered resolution for '%s'\"), path);\n2373b65059 1077) error_errno(_(\"cannot unlink '%s'\"), filename);\n2373b65059 1111) return error(_(\"index file corrupt\"));\n2373b65059 1199) die_errno(_(\"unable to open rr-cache directory\"));\n\nrevision.c\n2abf350385 1538) if (ce_path_match(istate, ce, &revs->prune_data, NULL)) {\n2abf350385 1544) while ((i+1 < istate->cache_nr) &&\n2abf350385 1545)        ce_same_name(ce, istate->cache[i+1]))\nb45424181e 2942) return;\nb45424181e 2945) return;\nb45424181e 2951) c->object.flags |= UNINTERESTING;\nb45424181e 2954) return;\nb45424181e 2957) mark_parents_uninteresting(c);\nb45424181e 2980) return;\nb45424181e 2983) return;\nb45424181e 3048) continue;\nf0d9cc4196 3097) if (!revs->ignore_missing_links)\nf0d9cc4196 3098) die(\"Failed to traverse parents of commit %s\",\nf0d9cc4196 3099)     oid_to_hex(&commit->object.oid));\nb45424181e 3107) continue;\n4a7e27e957 3473)     oideq(&p->item->object.oid, &commit->object.oid))\n\nrun-command.c\n2179045fd0 1229) error(_(\"cannot create async thread: %s\"), strerror(err));\n\nsend-pack.c\nc0e40a2d66 207) close(fd[1]);\n\nsequencer.c\nbcd33ec25f  683) np = strchrnul(buf, '\\n');\nbcd33ec25f  684) return error(_(\"no key present in '%.*s'\"),\nbcd33ec25f  695) return error(_(\"unable to dequote value of '%s'\"),\nbcd33ec25f  737) goto finish;\nbcd33ec25f  742) name_i = error(_(\"'GIT_AUTHOR_NAME' already given\"));\nbcd33ec25f  747) email_i = error(_(\"'GIT_AUTHOR_EMAIL' already given\"));\nbcd33ec25f  752) date_i = error(_(\"'GIT_AUTHOR_DATE' already given\"));\nbcd33ec25f  756) err = error(_(\"unknown variable '%s'\"),\nbcd33ec25f  761) error(_(\"missing 'GIT_AUTHOR_NAME'\"));\nbcd33ec25f  763) error(_(\"missing 'GIT_AUTHOR_EMAIL'\"));\nbcd33ec25f  765) error(_(\"missing 'GIT_AUTHOR_DATE'\"));\n65850686cf 2329) return;\n65850686cf 2426) write_file(rebase_path_quiet(), \"%s\\n\", quiet);\n2c58483a59 3427) return error(_(\"could not checkout %s\"), commit);\n4df66c40b0 3441) return error(_(\"%s: not a valid OID\"), orig_head);\n71f82465b1 3461) fprintf(stderr, _(\"Stopped at HEAD\\n\"));\nb97e187364 4827) return -1;\nb97e187364 4830) return -1;\nb97e187364 4836) return error_errno(_(\"could not read '%s'.\"), todo_file);\nb97e187364 4839) todo_list_release(&todo_list);\nb97e187364 4840) return error(_(\"unusable todo list: '%s'\"), todo_file);\nb97e187364 4859) todo_list_release(&todo_list);\nb97e187364 4860) return -1;\nb97e187364 4864) return error(_(\"could not copy '%s' to '%s'.\"), todo_file,\nb97e187364 4868) return error(_(\"could not transform the todo list\"));\nb97e187364 4897) return error(_(\"could not transform the todo list\"));\nb97e187364 4900) return error(_(\"could not skip unnecessary pick \ncommands\"));\nb97e187364 4906) return -1;\n\nsetup.c\n58b284a2e9  413) return config_error_nonbool(var);\n\nsha1-file.c\n67947c34ae sha1-file.c 2225) if (!hasheq(expected_sha1, real_sha1)) {\n\nsha1-name.c\n8aac67a174 sha1-name.c  162) return;\n\nsplit-index.c\ne3d837989e 335) ce->ce_flags |= CE_UPDATE_IN_BASE;\n\nstrbuf.c\nf95736288a  127) --sb->len;\n\nsubmodule-config.c\nbcbc780d14 739) return CONFIG_INVALID_KEY;\n45f5ef3d77 754) warning(_(\"Could not update .gitmodules entry %s\"), key);\n\ntrace.c\nc46c406ae1 189) now = getnanotime();\nc46c406ae1 190) perf_start_times[perf_indent] = now;\nc46c406ae1 191) if (perf_indent + 1 < ARRAY_SIZE(perf_start_times))\nc46c406ae1 192) perf_indent++;\nc46c406ae1 195) return now;\nc46c406ae1 211) if (perf_indent >= strlen(space))\nc46c406ae1 214) strbuf_addf(&buf, \":%.*s \", perf_indent, space);\nc46c406ae1 317) void trace_performance_leave_fl(const char *file, int line,\nc46c406ae1 323) if (perf_indent)\nc46c406ae1 324) perf_indent--;\nc46c406ae1 326) if (!format) /* Allow callers to leave without tracing \nanything */\nc46c406ae1 327) return;\nc46c406ae1 329) since = perf_start_times[perf_indent];\nc46c406ae1 330) va_start(ap, format);\nc46c406ae1 331) trace_performance_vprintf_fl(file, line, nanos - since, \nformat, ap);\nc46c406ae1 332) va_end(ap);\nc46c406ae1 477) trace_performance_leave(\"git command:%s\", command_line.buf);\nc46c406ae1 485) if (!command_line.len)\nc46c406ae1 490) trace_performance_enter();\n\ntransport.c\nunpack-trees.c\nb878579ae7  360) string_list_append(&list, ce->name);\nb878579ae7  361) ce->ce_flags &= ~CE_MATCHED;\nb878579ae7  368) warning(_(\"the following paths have collided (e.g. \ncase-sensitive paths\\n\"\nb878579ae7  372) for (i = 0; i < list.nr; i++)\nb878579ae7  373) fprintf(stderr, \"  '%s'\\n\", list.items[i].string);\nf1e11c6510  777) free(tree_ce);\nb4da37380b  778) return rc;\nb4da37380b  785) printf(\"Unpacked %d entries from %s to %s using \ncache-tree\\n\",\nb4da37380b  787)        o->src_index->cache[pos]->name,\nb4da37380b  788)        o->src_index->cache[pos + nr_entries - 1]->name);\n\nupload-pack.c\n1d1243fe63 1403) deepen(INFINITE_DEPTH, data->deepen_relative, \n&data->shallows,\n\nworktree.c\n3a3b9d8cde 495) return -1;\n3a3b9d8cde 508) return -1;\n3a3b9d8cde 517) return -1;\nab3e1f78ae 537) break;\n\nwt-status.c\nf3bd35fa0d  671) s->committable = 1;\n73ba5d78b4 1958) if (s->state.rebase_in_progress ||\n73ba5d78b4 1959)     s->state.rebase_interactive_in_progress)\n73ba5d78b4 1960) branch_name = s->state.onto;\n73ba5d78b4 1961) else if (s->state.detached_from)\n73ba5d78b4 1962) branch_name = s->state.detached_from;\n\nxdiff-interface.c\nxdiff/xutils.c\n611e42a598 405) return -1;\n\nCommits introducing uncovered code:\nÆvar Arnfjörð Bjarmason      62c23938f: tests: add a special setup where \nrebase.useBuiltin is off\nAlban Gruin      0af129b2e: rebase--interactive2: rewrite the submodes \nof interactive rebase in C\nAlban Gruin      2c58483a5: rebase -i: rewrite setup_reflog_action() in C\nAlban Gruin      34b47315d: rebase -i: move rebase--helper modes to \nrebase--interactive\nAlban Gruin      4df66c40b: rebase -i: rewrite checkout_onto() in C\nAlban Gruin      53bbcfbde: rebase -i: implement the main part of \ninteractive rebase as a builtin\nAlban Gruin      64a43cbd5: rebase -i: rewrite the edit-todo \nfunctionality in C\nAlban Gruin      65850686c: rebase -i: rewrite write_basic_state() in C\nAlban Gruin      a9f5476fb: sequencer: refactor append_todo_help() to \nwrite its message to a buffer\nAlban Gruin      b97e18736: rebase -i: rewrite complete_action() in C\nAntonio Ospite      45f5ef3d7: submodule: factor out a \nconfig_set_in_gitmodules_file_gently function\nAntonio Ospite      76e9bdc43: submodule: support reading .gitmodules \nwhen it's not in the working tree\nAntonio Ospite      bcbc780d1: submodule: add a \nprint_config_from_gitmodules() helper\nBen Peart      3255089ad: ieot: add Index Entry Offset Table (IEOT) \nextension\nBen Peart      3b1d9e045: eoie: add End of Index Entry (EOIE) extension\nBen Peart      77ff1127a: read-cache: load cache entries on worker threads\nBen Peart      abb4bb838: read-cache: load cache extensions on a worker \nthread\nBen Peart      c780b9cfe: config: add new index.threads config setting\nBen Peart      d1664e73a: add: speed up cmd_add() by utilizing \nread_cache_preload()\nBen Peart      fa655d841: checkout: optimize \"git checkout -b <new_branch>\"\nBrendan Forster      93aef7c79: http: add support for disabling SSL \nrevocation checks in cURL\nbrian m. carlson      2f0c9e9a9: builtin/repack: replace hard-coded \nconstants\nbrian m. carlson      eccb5a5f3: apply: rename new_sha1_prefix and \nold_sha1_prefix\nChristian Couder      108f53038: pack-objects: move tree_depth into \n'struct packing_data'\nChristian Couder      fe0ac2fb7: pack-objects: move 'layer' into 'struct \npacking_data'\nDerrick Stolee      0d5b3a5ef: midx: write object ids in a chunk\nDerrick Stolee      17c35c896: packfile: skip loading index if in \nmulti-pack-index\nDerrick Stolee      1d614d41e: commit-reach: move ref_newer from remote.c\nDerrick Stolee      1dcd9f204: midx: close multi-pack-index on repack\nDerrick Stolee      20fd6d579: commit-graph: not compatible with grafts\nDerrick Stolee      3715a6335: midx: read objects from multi-pack-index\nDerrick Stolee      454ea2e4d: treewide: use get_all_packs\nDerrick Stolee      4d80560c5: multi-pack-index: load into memory\nDerrick Stolee      4fbcca4ef: commit-reach: make can_all_from_reach... \nlinear\nDerrick Stolee      5227c3856: commit-reach: move walk methods from commit.c\nDerrick Stolee      525e18c04: midx: clear midx on repack\nDerrick Stolee      56ee7ff15: multi-pack-index: add 'verify' verb\nDerrick Stolee      662148c43: midx: write object offsets\nDerrick Stolee      66ec0390e: fsck: verify multi-pack-index\nDerrick Stolee      6a22d5212: pack-objects: consider packs in \nmulti-pack-index\nDerrick Stolee      6cc017431: commit-reach: use can_all_from_reach\nDerrick Stolee      6d68e6a46: multi-pack-index: provide more helpful \nusage info\nDerrick Stolee      85daa01f6: remote: make add_missing_tags() linear\nDerrick Stolee      8aac67a17: midx: use midx in abbreviation calculations\nDerrick Stolee      a40498a12: midx: use existing midx when writing new one\nDerrick Stolee      b45424181: revision.c: generation-based topo-order \nalgorithm\nDerrick Stolee      b67f6b26e: commit-reach: properly peel tags\nDerrick Stolee      cc6af73c0: multi-pack-index: verify object offsets\nDerrick Stolee      f0d9cc419: revision.c: begin refactoring \n--topo-order logic\nDerrick Stolee      fc59e7484: midx: write header information to lockfile\nDerrick Stolee      fe1ed56f5: midx: sort and deduplicate objects from \npackfiles\nDuy Nguyen      b878579ae: clone: report duplicate entries on \ncase-insensitive filesystems\nEric Sunshine      2e6fd71a5: format-patch: extend --range-diff to \naccept revision range\nEric Sunshine      40ce41604: format-patch: allow --range-diff to apply \nto a lone-patch\nEric Sunshine      68a6b3a1b: worktree: teach 'move' to override lock \nwhen --force given twice\nEric Sunshine      8631bf1cd: format-patch: add --creation-factor tweak \nfor --range-diff\nEric Sunshine      e19831c94: worktree: teach 'add' to respect --force \nfor registered but missing path\nEric Sunshine      e5353bef5: worktree: move delete_git_dir() earlier in \nfile for upcoming new callers\nEric Sunshine      ee6cbf712: format-patch: allow --interdiff to apply \nto a lone-patch\nEric Sunshine      f4143101c: worktree: teach 'remove' to override lock \nwhen --force given twice\nJeff King      0074c9110: combine-diff: use an xdiff hunk callback\nJeff King      01a31f3bc: pull: handle --verify-signatures for unborn branch\nJeff King      0eb8d3767: cat-file: report an error on multiple --batch \noptions\nJeff King      16d75fa48: repack: add delta-islands support\nJeff King      28b8a7308: pack-objects: add delta-islands support\nJeff King      2c8ee1f53: bundle: dup() output descriptor closer to \npoint-of-use\nJeff King      2fa233a55: pack-objects: handle island check for \n\"external\" delta base\nJeff King      30cdc33fb: pack-bitmap: save \"have\" bitmap from walk\nJeff King      4a7e27e95: convert \"oidcmp() == 0\" to oideq()\nJeff King      517fe807d: assert NOARG/NONEG behavior of parse-options \ncallbacks\nJeff King      611e42a59: xdiff: provide a separate emit callback for hunks\nJeff King      67947c34a: convert \"hashcmp() != 0\" to \"!hasheq()\"\nJeff King      735ca208c: apply: return -1 from option callback instead \nof calling exit(1)\nJeff King      8a2c17467: pathspec: handle non-terminated strings with \n:(attr)\nJeff King      9001dc2a7: convert \"oidcmp() != 0\" to \"!oideq()\"\nJeff King      98f425b45: cat-file: handle streaming failures consistently\nJeff King      c27cc94fa: approxidate: handle pending number for \"specials\"\nJeff King      c8d521faf: Add delta-islands.{c,h}\nJeff King      cc00e5ce6: convert hashmap comparison functions to oideq()\nJeff King      fce566480: am: handle --no-patch-format option\nJohannes Schindelin      21084e84a: http: add support for selecting SSL \nbackends at runtime\nJohannes Schindelin      3249c1251: rebase: consolidate clean-up code \nbefore leaving reset_head()\nJohannes Schindelin      501afcb8b: mingw: use domain information for \ndefault email\nJohannes Schindelin      71f82465b: rebase -i: introduce the 'break' command\nJohannes Schindelin      b67d40adb: http: when using Secure Channel, \nignore sslCAInfo by default\nJohannes Schindelin      bac2a1e36: built-in rebase: reinstate `checkout \n-q` behavior where appropriate\nJohannes Schindelin      bc24382c2: builtin rebase: prepare for builtin \nrebase -i\nJonathan Nieder      302997027: gc: do not return error for prior errors \nin daemonized mode\nJonathan Nieder      fec2ed218: gc: exit with status 128 on failure\nJonathan Tan      1d1243fe6: upload-pack: make want_obj not global\nJosh Steadmon      1127a98cc: fuzz: add fuzz testing for packfile indices.\nMatthew DeVore      7c0fe330d: rev-list: handle missing tree objects \nproperly\nMatthew DeVore      bc5975d24: list-objects-filter: implement filter tree:0\nMatthew DeVore      cc0b05a4c: list-objects-filter-options: do not \nover-strbuf_init\nMatthew DeVore      f447a499d: list-objects: store common func args in \nstruct\nMichał Górny      4de9394dc: gpg-interface.c: obtain primary key \nfingerprint as well\nNguyễn Thái Ngọc Duy      2179045fd: Clean up pthread_create() error \nhandling\nNguyễn Thái Ngọc Duy      252d079cb: read-cache.c: optimize reading \nindex format v4\nNguyễn Thái Ngọc Duy      26c7d0678: help -a: improve and make --verbose \ndefault\nNguyễn Thái Ngọc Duy      2abf35038: revision.c: remove implicit \ndependency on the_index\nNguyễn Thái Ngọc Duy      3a3b9d8cd: refs: new ref types to make \nper-worktree refs visible to all worktrees\nNguyễn Thái Ngọc Duy      58b284a2e: worktree: add per-worktree config files\nNguyễn Thái Ngọc Duy      a470beea3: blame.c: rename \"repo\" argument to \"r\"\nNguyễn Thái Ngọc Duy      ab3e1f78a: revision.c: better error reporting \non ref from different worktrees\nNguyễn Thái Ngọc Duy      ae9af1228: status: show progress bar if \nrefreshing the index takes too long\nNguyễn Thái Ngọc Duy      b29759d89: fsck: check HEAD and reflog from \nother worktrees\nNguyễn Thái Ngọc Duy      b4da37380: unpack-trees: optimize walking same \ntrees with cache-tree\nNguyễn Thái Ngọc Duy      b78ea5fc3: diff.c: reduce implicit dependency \non the_index\nNguyễn Thái Ngọc Duy      c0e40a2d6: send-pack.c: move async's #ifdef \nNO_PTHREADS back to run-command.c\nNguyễn Thái Ngọc Duy      c46c406ae: trace.h: support nested performance \ntracing\nNguyễn Thái Ngọc Duy      c9ef0d95e: reflog expire: cover reflog from \nall worktrees\nNguyễn Thái Ngọc Duy      f1e11c651: unpack-trees: reduce malloc in \ncache-tree walk\nNguyễn Thái Ngọc Duy      fd6263fb7: grep: clean up num_threads handling\nOlga Telezhnaya      f0062d3b7: ref-filter: free item->value and \nitem->value->s\nPhillip Wood      bcd33ec25: add read_author_script() to libgit\nPratik Karki      002ee2fe6: builtin rebase: support `keep-empty` option\nPratik Karki      0eabf4b95: builtin rebase: stop if `git am` is in progress\nPratik Karki      12026a412: builtin rebase: support `--gpg-sign` option\nPratik Karki      122420c29: builtin rebase: support --skip\nPratik Karki      1ed9c14ff: builtin rebase: support --force-rebase\nPratik Karki      3c3588c7d: builtin rebase: support \n--rebase-merges[=[no-]rebase-cousins]\nPratik Karki      55071ea24: rebase: start implementing it as a builtin\nPratik Karki      5a6149453: builtin rebase: support --quit\nPratik Karki      5e5d96197: builtin rebase: support --abort\nPratik Karki      6defce2b0: builtin rebase: support `--autostash` option\nPratik Karki      73d51ed0a: builtin rebase: support --signoff\nPratik Karki      9a48a615b: builtin rebase: try to fast forward when \npossible\nPratik Karki      9dba809a6: builtin rebase: support --root\nPratik Karki      ac7f467fe: builtin/rebase: support running \"git rebase \n<upstream>\"\nPratik Karki      ba1905a5f: builtin rebase: add support for custom \nmerge strategies\nPratik Karki      bff014dac: builtin rebase: support the `verbose` and \n`diffstat` options\nPratik Karki      c54dacb50: builtin rebase: start a new rebase only if \nnone is in progress\nPratik Karki      cda614e48: builtin rebase: show progress when \nconnected to a terminal\nPratik Karki      e0333e5c6: builtin rebase: require a clean worktree\nPratik Karki      e65123a71: builtin rebase: support `git rebase \n<upstream> <switch-to>`\nPratik Karki      ead98c111: builtin rebase: support --rerere-autoupdate\nPratik Karki      f28d40d3a: builtin rebase: support --onto\nPratik Karki      f95736288: builtin rebase: support --continue\nRasmus Villemoes      a9a60b94c: git.c: handle_alias: prepend alias info \nwhen first argument is -h\nRasmus Villemoes      e6e76baaf: help: redirect to aliased commands for \n\"git cmd --help\"\nRené Scharfe      3aa4d81f8: mailinfo: support format=flowed\nRené Scharfe      8b2f8cbcb: oidset: use khash\nRené Scharfe      fb8952077: fsck: use strbuf_getline() to read skiplist \nfile\nShulhan      5025425df: builtin/remote: quote remote name on error to \ndisplay empty name\nStefan Beller      4a6067cda: refs.c: migrate internal ref iteration to \npass thru repository argument\nStefan Beller      74d4731da: submodule--helper: replace \nconnect-gitdir-workingtree by ensure-core-worktree\nStefan Beller      e0a862fda: submodule helper: convert relative URL to \nabsolute URL if needed\nStefan Beller      ee69b2a90: submodule--helper: introduce new \nupdate-module-mode helper\nStephen P. Smith      73ba5d78b: roll wt_status_state into wt_status and \npopulate in the collect phase\nStephen P. Smith      f3bd35fa0: wt-status.c: set the committable flag \nin the collect phase\nSZEDER Gábor      e3d837989: split-index: don't compare cached data of \nentries already marked for split index\nThomas Gummerer      2373b6505: rerere: mark strings for translation\nThomas Gummerer      4af32207b: rerere: teach rerere to handle nested \nconflicts\nThomas Gummerer      c0f16f8e1: rerere: factor out handle_conflict function\nTim Schumacher      c6d75bc17: alias: add support for aliases of an alias\nTorsten Bögershausen      d64324cb6: Make git_check_attr() a void function\n\n"},{"id":"363643","messageId":"6f532502-d4b6-17f6-0ec7-01079077ac90@gmail.com","threadId":"49853","inReplyTo":"9e293b1b-1845-1772-409b-031c0bf4d17b@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-19T15:40:53Z","receivedAt":"2018-11-19T15:40:58Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"The test coverage reports started mid-way through this release cycle, so \nI thought it would be good to do a full review of the new uncovered code \nsince the last release.\n\nI eliminated most of the uncovered code due to the following cases:\n\n1. Code was only moved or refactored.\n2. Code was related to unusual error conditions (e.g. open_pack_index() \nfails)\n\nThe comments below are intended only to point out potential directions \nto improve test coverage. Some of it is for me to do!\n\nThanks,\n-Stolee\n\nOn 11/18/2018 9:54 PM, Derrick Stolee wrote:\n> 66ec0390e7 builtin/fsck.c 888) midx_argv[2] = \"--object-dir\";\n> 66ec0390e7 builtin/fsck.c 889) midx_argv[3] = alt->path;\n> 66ec0390e7 builtin/fsck.c 890) if (run_command(&midx_verify))\n> 66ec0390e7 builtin/fsck.c 891) errors_found |= ERROR_COMMIT_GRAPH;\n>\n\nThere are two things wrong here:\n\n1. Not properly covering multi-pack-index fsck with alternates.\n2. the ERROR_COMMIT_GRAPH flag when the multi-pack-index is being checked.\n\nI'll submit a patch to fix this.\n\n> 2fa233a554 builtin/pack-objects.c 1512) hashcpy(base_oid.hash, \n> base_sha1);\n> 2fa233a554 builtin/pack-objects.c 1513) if \n> (!in_same_island(&delta->idx.oid, &base_oid))\n> 2fa233a554 builtin/pack-objects.c 1514) return 0;\n\nThese lines are inside a block for the following if statement:\n\n+       /*\n+        * Otherwise, reachability bitmaps may tell us if the receiver \nhas it,\n+        * even if it was buried too deep in history to make it into the\n+        * packing list.\n+        */\n+       if (thin && bitmap_has_sha1_in_uninteresting(bitmap_git, \nbase_sha1)) {\n\nPeff: is this difficult to test?\n\n> 28b8a73080 builtin/pack-objects.c 2793) depth++;\n> 108f530385 builtin/pack-objects.c 2797) oe_set_tree_depth(&to_pack, \n> ent, depth); \n\nThis 'depth' variable is incremented as part of a for loop in this patch:\n\n  static void show_object(struct object *obj, const char *name, void *data)\n@@ -2686,6 +2706,19 @@ static void show_object(struct object *obj, const \nchar *name, void *data)\n         add_preferred_base_object(name);\n         add_object_entry(&obj->oid, obj->type, name, 0);\n         obj->flags |= OBJECT_ADDED;\n+\n+       if (use_delta_islands) {\n+               const char *p;\n+               unsigned depth = 0;\n+               struct object_entry *ent;\n+\n+               for (p = strchr(name, '/'); p; p = strchr(p + 1, '/'))\n+                       depth++;\n+\n+               ent = packlist_find(&to_pack, obj->oid.hash, NULL);\n+               if (ent && depth > ent->tree_depth)\n+                       ent->tree_depth = depth;\n+       }\n  }\n\nAnd that 'ent->tree_depth = depth;' line is replaced with the \noe_set_tree_depth() call in the report.\n\nSince depth is never incremented, we are not covering this block. Is it \npossible to test?\n\n> builtin/repack.c\n> 16d75fa48d  48) use_delta_islands = git_config_bool(var, value);\n> 16d75fa48d  49) return 0;\n\nThis is a simple config option check for \"repack.useDeltaIslands\". The \nlogic it enables is tested, so this is an OK gap, in my opinion.\n\n > builtin/submodule--helper.c\n> ee69b2a90c 1476) out->type = sub->update_strategy.type;\n> ee69b2a90c 1477) out->command = sub->update_strategy.command;\n\nThis block was introduced by this part of the patch:\n\n+       } else if (sub->update_strategy.type != SM_UPDATE_UNSPECIFIED) {\n+               trace_printf(\"loaded thing\");\n+               out->type = sub->update_strategy.type;\n+               out->command = sub->update_strategy.command;\n\nWhich seems to be an important case, as the other SM_UPDATE_* types seem \nlike interesting cases.\n\nStefan: what actions would trigger this block? Is it easy to test?\n\n> delta-islands.c\n> c8d521faf7  53) memcpy(b, old, size);\n\nThis memcpy happens when the 'old' island_bitmap is passed to \nisland_bitmap_new(), but...\n\n> c8d521faf7 187) b->refcount--;\n> c8d521faf7 188) b = kh_value(island_marks, pos) = island_bitmap_new(b);\n\nThis block has the only non-NULL caller to island_bitmap_new().\n\n> c8d521faf7 212) obj = ((struct tag *)obj)->tagged;\n> c8d521faf7 213) if (obj) {\n> c8d521faf7 214) parse_object(the_repository, &obj->oid);\n> c8d521faf7 215) marks = create_or_get_island_marks(obj);\n> c8d521faf7 216) island_bitmap_set(marks, island_counter);\n\nIt appears that this block would happen if we placed a tag in the delta \nisland.\n\n> c8d521faf7 397) strbuf_addch(&island_name, '-');\n\nThis block is inside the following patch:\n\n+       if (matches[ARRAY_SIZE(matches) - 1].rm_so != -1)\n+               warning(_(\"island regex from config has \"\n+                         \"too many capture groups (max=%d)\"),\n+                       (int)ARRAY_SIZE(matches) - 2);\n+\n+       for (m = 1; m < ARRAY_SIZE(matches); m++) {\n+               regmatch_t *match = &matches[m];\n+\n+               if (match->rm_so == -1)\n+                       continue;\n+\n+               if (island_name.len)\n+                       strbuf_addch(&island_name, '-');\n+\n+               strbuf_add(&island_name, refname + match->rm_so, \nmatch->rm_eo - match->rm_so);\n+       }\n\nThis likely means that ARRAY_SIZE(matches) is never more than two.\n\n\n> c8d521faf7 433) continue;\n> c8d521faf7 436) list[dst] = list[src];\n\nThese blocks are inside the following nested loop in deduplicate_islands():\n\n+       for (ref = 0; ref + 1 < island_count; ref++) {\n+               for (src = ref + 1, dst = src; src < island_count; src++) {\n+                       if (list[ref]->hash == list[src]->hash)\n+                               continue;\n+\n+                       if (src != dst)\n+                               list[dst] = list[src];\n+\n+                       dst++;\n+               }\n+               island_count = dst;\n+       }\n\nThis means that our \"deduplication\" logic is never actually doing \nanything meaningful.\n\n> entry.c\n> b878579ae7 402) static void mark_colliding_entries(const struct \n> checkout *state,\n\n(there is interesting logic in this method, but it is only enabled on \ncase-insensitive filesystems. This run was done on a case-sensitive file \nsystem. Related changes happen in unpack-trees.c.)\n\n> help.c\n> 26c7d06783 help.c         500) static int get_alias(const char *var, \n> const char *value, void *data)\n> 26c7d06783 help.c         502) struct string_list *list = data;\n> 26c7d06783 help.c         504) if (skip_prefix(var, \"alias.\", &var))\n> 26c7d06783 help.c         505) string_list_append(list, var)->util = \n> xstrdup(value);\n> 26c7d06783 help.c         507) return 0;\n> 26c7d06783 help.c         530) printf(\"\\n%s\\n\", _(\"Command aliases\"));\n> 26c7d06783 help.c         531) ALLOC_ARRAY(aliases, alias_list.nr + 1);\n> 26c7d06783 help.c         532) for (i = 0; i < alias_list.nr; i++) {\n> 26c7d06783 help.c         533) aliases[i].name = \n> alias_list.items[i].string;\n> 26c7d06783 help.c         534) aliases[i].help = \n> alias_list.items[i].util;\n> 26c7d06783 help.c         535) aliases[i].category = 1;\n> 26c7d06783 help.c         537) aliases[alias_list.nr].name = NULL;\n> 26c7d06783 help.c         538) print_command_list(aliases, 1, longest);\n> 26c7d06783 help.c         539) free(aliases);\n\nThis logic introduces alias help in 'git help -a'. This seems like a \nsimple thing for adding a test to ensure that this works now and in the \nfuture.\n\n>\n> http.c\nThe code in here seems to be logic for Windows-specific SSL backends, so \nis not covered by this report.\n\n> preload-index.c\n> ae9af12287  63) struct progress_data *pd = p->progress;\n> ae9af12287  65) pthread_mutex_lock(&pd->mutex);\n> ae9af12287  66) pd->n += last_nr - nr;\n> ae9af12287  67) display_progress(pd->progress, pd->n);\n> ae9af12287  68) pthread_mutex_unlock(&pd->mutex);\n> ae9af12287  69) last_nr = nr;\n> ae9af12287  83) struct progress_data *pd = p->progress;\n> ae9af12287  85) pthread_mutex_lock(&pd->mutex);\n> ae9af12287  86) display_progress(pd->progress, pd->n + last_nr);\n> ae9af12287  87) pthread_mutex_unlock(&pd->mutex);\n> ae9af12287 118) pd.progress = start_delayed_progress(_(\"Refreshing \n> index\"), index->cache_nr);\n> ae9af12287 119) pthread_mutex_init(&pd.mutex, NULL);\n> ae9af12287 132) p->progress = &pd;\n\nThere's a lot of stuff going on with showing progress on index writes. \nWhile the commit message states the progress doesn't show up for 3 \nseconds, perhaps that can be tweaked to be in the millisecond range for \na test?\n\n> read-cache.c\n\n(There's a lot of progress stuff here, too.)\n\nThere are a lot of lines introduced by the IEOT extension in these commits:\n\n > Ben Peart      3255089ad: ieot: add Index Entry Offset Table (IEOT) \nextension\n > Ben Peart      3b1d9e045: eoie: add End of Index Entry (EOIE) extension\n > Ben Peart      77ff1127a: read-cache: load cache entries on worker \nthreads\n > Ben Peart      abb4bb838: read-cache: load cache extensions on a \nworker thread\n > Ben Peart      c780b9cfe: config: add new index.threads config setting\n > Ben Peart      d1664e73a: add: speed up cmd_add() by utilizing \nread_cache_preload()\n > Ben Peart      fa655d841: checkout: optimize \"git checkout -b \n<new_branch>\"\n\n> revision.c\n> b45424181e 2951) c->object.flags |= UNINTERESTING;\n> b45424181e 2957) mark_parents_uninteresting(c);\n\nThese blocks are currently unreachable because we do not use the new \ntopo-order logic when there are UNINTERESTING commits. (This will be \nreplaced after we have generation numbers v2.) I could force using this \nlogic in a `git log --topo-order A..B` query when GIT_TEST_COMMIT_GRAPH \nis enabled.\n\n"},{"id":"363646","messageId":"20181119162137.GA10621@sigill.intra.peff.net","threadId":"49853","inReplyTo":"6f532502-d4b6-17f6-0ec7-01079077ac90@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-19T16:21:38Z","receivedAt":"2018-11-19T16:21:42Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 19, 2018 at 10:40:53AM -0500, Derrick Stolee wrote:\n\n> > 2fa233a554 builtin/pack-objects.c 1512) hashcpy(base_oid.hash,\n> > base_sha1);\n> > 2fa233a554 builtin/pack-objects.c 1513) if\n> > (!in_same_island(&delta->idx.oid, &base_oid))\n> > 2fa233a554 builtin/pack-objects.c 1514) return 0;\n> \n> These lines are inside a block for the following if statement:\n> \n> +       /*\n> +        * Otherwise, reachability bitmaps may tell us if the receiver has\n> it,\n> +        * even if it was buried too deep in history to make it into the\n> +        * packing list.\n> +        */\n> +       if (thin && bitmap_has_sha1_in_uninteresting(bitmap_git, base_sha1))\n> {\n> \n> Peff: is this difficult to test?\n\nA bit.\n\nThe two features (thin-packs and delta-islands) would not generally be\nused together (one is for serving fetches, the other is for optimizing\non-disk packs to serve fetches). Something like:\n\n echo HEAD^ | git pack-objects --revs --thin --delta-islands\n\nwould probably exercise it (assuming there's a delta in HEAD^ against\nsomething in HEAD), but you'd need to construct a very specific scenario\nif you wanted to do any kind of checks no the output.\n\n> > 28b8a73080 builtin/pack-objects.c 2793) depth++;\n> > 108f530385 builtin/pack-objects.c 2797) oe_set_tree_depth(&to_pack, ent,\n> > depth);\n> \n> This 'depth' variable is incremented as part of a for loop in this patch:\n> \n>  static void show_object(struct object *obj, const char *name, void *data)\n> @@ -2686,6 +2706,19 @@ static void show_object(struct object *obj, const\n> char *name, void *data)\n>         add_preferred_base_object(name);\n>         add_object_entry(&obj->oid, obj->type, name, 0);\n>         obj->flags |= OBJECT_ADDED;\n> +\n> +       if (use_delta_islands) {\n> +               const char *p;\n> +               unsigned depth = 0;\n> +               struct object_entry *ent;\n> +\n> +               for (p = strchr(name, '/'); p; p = strchr(p + 1, '/'))\n> +                       depth++;\n> +\n> +               ent = packlist_find(&to_pack, obj->oid.hash, NULL);\n> +               if (ent && depth > ent->tree_depth)\n> +                       ent->tree_depth = depth;\n> +       }\n>  }\n> \n> And that 'ent->tree_depth = depth;' line is replaced with the\n> oe_set_tree_depth() call in the report.\n> \n> Since depth is never incremented, we are not covering this block. Is it\n> possible to test?\n\nLooks like t5320 only has single-level trees. We probably just need to\nadd a deeper tree. A more interesting case is when an object really is\nfound at multiple depths, but constructing a case that cared about that\nwould be quite complicated.\n\nThat said, there is much bigger problem with this code, which is that\n108f530385 (pack-objects: move tree_depth into 'struct packing_data',\n2018-08-16) is totally broken. It works on the trivial repository in the\ntest, but try this (especially under valgrind or ASan) on a real\nrepository:\n\n  git repack -adi\n\nwhich will crash immediately.  It doesn't correctly maintain the\ninvariant that if tree_depth is not NULL, it is the same size as\nthe main object array.\n\nI'll see if I can come up with a fix.\n\n-Peff\n"},{"id":"363652","messageId":"871s7g29zy.fsf@evledraar.gmail.com","threadId":"49853","inReplyTo":"9e293b1b-1845-1772-409b-031c0bf4d17b@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-19T18:33:05Z","receivedAt":"2018-11-19T18:33:10Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 19 2018, Derrick Stolee wrote:\n\n> Here is a test coverage report for the uncovered lines introduced in\n> v2.20.0-rc0 compared to v2.19.1.\n\nThanks a lot for this.\n\n> [...]\n> builtin/rebase.c\n> 62c23938fa 55) return env;\n> [...]\n> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n> where rebase.useBuiltin is off\n\nThis one would be covered with\nGIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\nthe rest of the coverage would look different when passed through the various GIT_TEST_* options.\n\nThat would make it take at least 12x as long if you did them one at a\ntime. Probably just 2-3x as long in practice since most can be combined\nin some way, and somewhat computationally infeasible if you're going to\ntry all possible combinations.\n\n> [...]\n> fsck.c\n> fb8952077d 214) die_errno(\"Could not read '%s'\", path);\n>\n> René Scharfe fb8952077: fsck: use strbuf_getline() to read\n> skiplist file\n\nThe fault of a patch I submitted. Couldn't find a sane & portable way to\nemulate cases where ferror() would trigger.\n"},{"id":"363653","messageId":"20181119184438.GA21528@sigill.intra.peff.net","threadId":"49853","inReplyTo":"20181119162137.GA10621@sigill.intra.peff.net","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-19T18:44:39Z","receivedAt":"2018-11-19T18:44:44Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 19, 2018 at 11:21:38AM -0500, Jeff King wrote:\n\n> > +       if (use_delta_islands) {\n> > +               const char *p;\n> > +               unsigned depth = 0;\n> > +               struct object_entry *ent;\n> > +\n> > +               for (p = strchr(name, '/'); p; p = strchr(p + 1, '/'))\n> > +                       depth++;\n> > +\n> > +               ent = packlist_find(&to_pack, obj->oid.hash, NULL);\n> > +               if (ent && depth > ent->tree_depth)\n> > +                       ent->tree_depth = depth;\n> > +       }\n> >  }\n> > \n> > And that 'ent->tree_depth = depth;' line is replaced with the\n> > oe_set_tree_depth() call in the report.\n> > \n> > Since depth is never incremented, we are not covering this block. Is it\n> > possible to test?\n> \n> Looks like t5320 only has single-level trees. We probably just need to\n> add a deeper tree. A more interesting case is when an object really is\n> found at multiple depths, but constructing a case that cared about that\n> would be quite complicated.\n> \n> That said, there is much bigger problem with this code, which is that\n> 108f530385 (pack-objects: move tree_depth into 'struct packing_data',\n> 2018-08-16) is totally broken. It works on the trivial repository in the\n> test, but try this (especially under valgrind or ASan) on a real\n> repository:\n> \n>   git repack -adi\n> \n> which will crash immediately.  It doesn't correctly maintain the\n> invariant that if tree_depth is not NULL, it is the same size as\n> the main object array.\n> \n> I'll see if I can come up with a fix.\n\nJust a quick update to prevent anyone else looking at it: I have a fix\nfor this (and another related issue with that commit).\n\nThere's an edge case in that depth computation that I think is\nunhandled, as well. I _think_ it doesn't trigger very often, but I'm\nrunning some experiments to verify it. That's S-L-O-W, so I probably\nwon't have results until tomorrow.\n\n-Peff\n"},{"id":"363655","messageId":"20181119185109.GA47930@google.com","threadId":"49853","inReplyTo":"871s7g29zy.fsf@evledraar.gmail.com","subject":"Re: [PATCH] tests: add a special setup where rebase.useBuiltin is off (Re: Git Test Coverage Report (v2.20.0-rc0))","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-11-19T18:51:09Z","receivedAt":"2018-11-19T18:51:14Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Nov 19 2018, Derrick Stolee wrote:\n\n>> [...]\n>> builtin/rebase.c\n>> 62c23938fa 55) return env;\n>> [...]\n>> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n>> where rebase.useBuiltin is off\n>\n> This one would be covered with\n> GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n> the rest of the coverage would look different when passed through the various GIT_TEST_* options.\n\nI wonder if we can do better for this kind of thing.\n\nWhen I do routine development, I am not running tests with any\nnon-default flags.  So why should tests run with non-default flags\ncount toward coverage?  Is there a way to make the default test\nsettings dip their feet into some non-default configurations, without\nrunning the full battery of tests and slowing tests down accordingly?\nE.g. is there some kind of smoke test that rebase with\nuseBuiltin=false works at all that could run, even if I am not running\nthe full battery of rebase tests?\n\nThat's a bit of a non sequitor for this example, which is actual code\nto handle GIT_TEST_REBASE_USE_BUILTIN, though.  For it, I wonder why\nwe need rebase.c to understand the envvar --- couldn't test-lib.sh\ntake care of setting rebase.useBuiltin to false when it's set?\n\nThanks,\nJonathan\n"},{"id":"363656","messageId":"d39320e2-0614-569b-4e82-7f7541589aea@gmail.com","threadId":"49853","inReplyTo":"6f532502-d4b6-17f6-0ec7-01079077ac90@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Ben Peart","fromEmail":"peartben@gmail.com","sentAt":"2018-11-19T19:00:27Z","receivedAt":"2018-11-19T19:00:34Z","isPatch":false,"sender":{"key":"benpeart@microsoft.com","avatar":"https://avatars.githubusercontent.com/u/15252029?v=4"},"body":"\n\nOn 11/19/2018 10:40 AM, Derrick Stolee wrote:\n> The test coverage reports started mid-way through this release cycle, so \n> I thought it would be good to do a full review of the new uncovered code \n> since the last release.\n> \n> I eliminated most of the uncovered code due to the following cases:\n> \n> 1. Code was only moved or refactored.\n> 2. Code was related to unusual error conditions (e.g. open_pack_index() \n> fails)\n> \n> The comments below are intended only to point out potential directions \n> to improve test coverage. Some of it is for me to do!\n> \n> Thanks,\n> -Stolee\n> \n> On 11/18/2018 9:54 PM, Derrick Stolee wrote:\n> \n> There are a lot of lines introduced by the IEOT extension in these commits:\n> \n>  > Ben Peart      3255089ad: ieot: add Index Entry Offset Table (IEOT) \n> extension\n>  > Ben Peart      3b1d9e045: eoie: add End of Index Entry (EOIE) extension\n>  > Ben Peart      77ff1127a: read-cache: load cache entries on worker \n> threads\n>  > Ben Peart      abb4bb838: read-cache: load cache extensions on a \n> worker thread\n>  > Ben Peart      c780b9cfe: config: add new index.threads config setting\n>  > Ben Peart      d1664e73a: add: speed up cmd_add() by utilizing \n> read_cache_preload()\n>  > Ben Peart      fa655d841: checkout: optimize \"git checkout -b \n> <new_branch>\"\n> \n\nThese should be hit if you run the test suite with \nGIT_TEST_INDEX_THREADS=2.  Without that, the indexes for the various \ntests are too small to trigger multi-threaded index reads/writes.\n\n From t/README:\n\nGIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading\nof the index for the whole test suite by bypassing the default number of\ncache entries and thread minimums. Setting this to 1 will make the\nindex loading single threaded.\n\n\n"},{"id":"363659","messageId":"37b2c29d-43bb-9987-e91c-cb3e6b65d354@gmail.com","threadId":"49853","inReplyTo":"871s7g29zy.fsf@evledraar.gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-19T19:10:39Z","receivedAt":"2018-11-19T19:10:44Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 11/19/2018 1:33 PM, Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Nov 19 2018, Derrick Stolee wrote:\n>\n>> Here is a test coverage report for the uncovered lines introduced in\n>> v2.20.0-rc0 compared to v2.19.1.\n> Thanks a lot for this.\n>\n>> [...]\n>> builtin/rebase.c\n>> 62c23938fa 55) return env;\n>> [...]\n>> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n>> where rebase.useBuiltin is off\n> This one would be covered with\n> GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n> the rest of the coverage would look different when passed through the various GIT_TEST_* options.\n\nThe coverage report has been using the following:\n\nexport GIT_TEST_MULTI_PACK_INDEX=1\nexport GIT_TEST_COMMIT_GRAPH=1\nexport GIT_TEST_INDEX_VERION=4\nexport GIT_TEST_SPLIT_INDEX=yes\nexport GIT_TEST_OE_SIZE=10\nexport GIT_TEST_OE_DELTA_SIZE=5\n\nI need to add GIT_TEST_INDEX_THREADS=2 and GIT_TEST_REBASE_USE_BUILTIN=false\n\nThanks!\n-Stolee\n"},{"id":"363661","messageId":"87zhu4zwk5.fsf@evledraar.gmail.com","threadId":"49853","inReplyTo":"37b2c29d-43bb-9987-e91c-cb3e6b65d354@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-19T19:39:22Z","receivedAt":"2018-11-19T19:39:27Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 19 2018, Derrick Stolee wrote:\n\n> On 11/19/2018 1:33 PM, Ævar Arnfjörð Bjarmason wrote:\n>> On Mon, Nov 19 2018, Derrick Stolee wrote:\n>>\n>>> Here is a test coverage report for the uncovered lines introduced in\n>>> v2.20.0-rc0 compared to v2.19.1.\n>> Thanks a lot for this.\n>>\n>>> [...]\n>>> builtin/rebase.c\n>>> 62c23938fa 55) return env;\n>>> [...]\n>>> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n>>> where rebase.useBuiltin is off\n>> This one would be covered with\n>> GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n>> the rest of the coverage would look different when passed through the various GIT_TEST_* options.\n>\n> The coverage report has been using the following:\n>\n> export GIT_TEST_MULTI_PACK_INDEX=1\n> export GIT_TEST_COMMIT_GRAPH=1\n> export GIT_TEST_INDEX_VERION=4\n> export GIT_TEST_SPLIT_INDEX=yes\n> export GIT_TEST_OE_SIZE=10\n> export GIT_TEST_OE_DELTA_SIZE=5\n>\n> I need to add GIT_TEST_INDEX_THREADS=2 and GIT_TEST_REBASE_USE_BUILTIN=false\n\n...although note you'll need to also test without\nGIT_TEST_REBASE_USE_BUILTIN=false, otherwise a lot of the new C code\nwon't have coverage.\n"},{"id":"363664","messageId":"e992e36b-4b0f-060b-2224-31fad752e64d@gmail.com","threadId":"49853","inReplyTo":"87zhu4zwk5.fsf@evledraar.gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-19T19:44:41Z","receivedAt":"2018-11-19T19:44:47Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 11/19/2018 2:39 PM, Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Nov 19 2018, Derrick Stolee wrote:\n>\n>> The coverage report has been using the following:\n>>\n>> export GIT_TEST_MULTI_PACK_INDEX=1\n>> export GIT_TEST_COMMIT_GRAPH=1\n>> export GIT_TEST_INDEX_VERION=4\n>> export GIT_TEST_SPLIT_INDEX=yes\n>> export GIT_TEST_OE_SIZE=10\n>> export GIT_TEST_OE_DELTA_SIZE=5\n>>\n>> I need to add GIT_TEST_INDEX_THREADS=2 and GIT_TEST_REBASE_USE_BUILTIN=false\n> ...although note you'll need to also test without\n> GIT_TEST_REBASE_USE_BUILTIN=false, otherwise a lot of the new C code\n> won't have coverage.\n\nSorry for lack of clarity: I first run 'make coverage-test' with no \nGIT_TEST_* variables, then run the test suite again with the optional \nvariables.\n\nThanks,\n-Stolee\n"},{"id":"363671","messageId":"87wop8zsol.fsf@evledraar.gmail.com","threadId":"49853","inReplyTo":"20181119185109.GA47930@google.com","subject":"Re: [PATCH] tests: add a special setup where rebase.useBuiltin is off (Re: Git Test Coverage Report (v2.20.0-rc0))","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-19T21:03:06Z","receivedAt":"2018-11-19T21:03:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 19 2018, Jonathan Nieder wrote:\n\n> Ævar Arnfjörð Bjarmason wrote:\n>> On Mon, Nov 19 2018, Derrick Stolee wrote:\n>\n>>> [...]\n>>> builtin/rebase.c\n>>> 62c23938fa 55) return env;\n>>> [...]\n>>> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n>>> where rebase.useBuiltin is off\n>>\n>> This one would be covered with\n>> GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n>> the rest of the coverage would look different when passed through the various GIT_TEST_* options.\n>\n> I wonder if we can do better for this kind of thing.\n>\n> When I do routine development, I am not running tests with any\n> non-default flags.  So why should tests run with non-default flags\n> count toward coverage?  Is there a way to make the default test\n> settings dip their feet into some non-default configurations, without\n> running the full battery of tests and slowing tests down accordingly?\n> E.g. is there some kind of smoke test that rebase with\n> useBuiltin=false works at all that could run, even if I am not running\n> the full battery of rebase tests?\n\nYeah, definitely. Just pointing out that it would smoke out coverage we\ndon't have at all v.s. cases where we just don't have coverage with the\ndefault tests without any special modes.\n\nDerrick: I think it would be useful to produce some delta report showing\ncovered lines without any GIT_TEST_* variables v.s. when they're set. As\nJonathan points out those should ideally be tested with the normal test\nsuite, leaving GIT_TEST_* just for stress testing to find new bugs.\n\n> That's a bit of a non sequitor for this example, which is actual code\n> to handle GIT_TEST_REBASE_USE_BUILTIN, though.  For it, I wonder why\n> we need rebase.c to understand the envvar --- couldn't test-lib.sh\n> take care of setting rebase.useBuiltin to false when it's set?\n\nI guess the test-lib.sh could pass down things like\n\"GIT_CONFIG_PARAMETERS='x.y=z'\". Maybe that's a better way to do it.\n"},{"id":"363674","messageId":"d7cbe4d1-36ee-2a3c-7ca5-d2e59a8a750f@gmail.com","threadId":"49853","inReplyTo":"d39320e2-0614-569b-4e82-7f7541589aea@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-19T21:06:25Z","receivedAt":"2018-11-19T21:06:30Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 11/19/2018 2:00 PM, Ben Peart wrote:\n>\n>\n> On 11/19/2018 10:40 AM, Derrick Stolee wrote:\n>>\n>> There are a lot of lines introduced by the IEOT extension in these \n>> commits:\n>>\n>>  > Ben Peart      3255089ad: ieot: add Index Entry Offset Table \n>> (IEOT) extension\n>>  > Ben Peart      3b1d9e045: eoie: add End of Index Entry (EOIE) \n>> extension\n>>  > Ben Peart      77ff1127a: read-cache: load cache entries on worker \n>> threads\n>>  > Ben Peart      abb4bb838: read-cache: load cache extensions on a \n>> worker thread\n>>  > Ben Peart      c780b9cfe: config: add new index.threads config \n>> setting\n>>  > Ben Peart      d1664e73a: add: speed up cmd_add() by utilizing \n>> read_cache_preload()\n>>  > Ben Peart      fa655d841: checkout: optimize \"git checkout -b \n>> <new_branch>\"\n>>\n>\n> These should be hit if you run the test suite with \n> GIT_TEST_INDEX_THREADS=2.  Without that, the indexes for the various \n> tests are too small to trigger multi-threaded index reads/writes.\n>\n> From t/README:\n>\n> GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading\n> of the index for the whole test suite by bypassing the default number of\n> cache entries and thread minimums. Setting this to 1 will make the\n> index loading single threaded.\n\nI updated my build to add GIT_TEST_INDEX_THREADS=2 and I still see lots \nof uncovered stuff, including that load_cache_entries_threaded() is \nnever run.\n\nI added the following diff to my repo and ran the test suite manually \nwith GIT_TEST_INDEX_THREADS=2 and it didn't fail:\n\ndiff --git a/read-cache.c b/read-cache.c\nindex 4ca81286c0..36502586a2 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -2057,6 +2057,9 @@ static unsigned long \nload_cache_entries_threaded(struct index_state *istate, con\n         struct load_cache_entries_thread_data *data;\n         unsigned long consumed = 0;\n\n+       fprintf(stderr, \"load_cache_entries_threaded\\n\");\n+       exit(1);\n+\n         /* a little sanity checking */\n         if (istate->name_hash_initialized)\n                 BUG(\"the name hash isn't thread safe\");\n\nAm I missing something? Is there another variable I should add?\n\nWhen I look for where the GIT_TEST_INDEX_THREADS variable is checked, I \nsee that the calls to git_config_get_index_threads() are followed by a \ncheck for NO_PTHREADS (setting the number of threads to 1 again). Is it \npossible that my compiler environment is not allowing me to even compile \nwith threads?\n\nThanks,\n-Stolee\n\n\n\n"},{"id":"363676","messageId":"6f0ff2e3-4019-1dcc-f61a-cd0919b9a247@gmail.com","threadId":"49853","inReplyTo":"871s7g29zy.fsf@evledraar.gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-19T21:31:52Z","receivedAt":"2018-11-19T21:31:57Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 11/19/2018 1:33 PM, Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Nov 19 2018, Derrick Stolee wrote:\n>\n>> [...]\n>> builtin/rebase.c\n>> 62c23938fa 55) return env;\n>> [...]\n>> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n>> where rebase.useBuiltin is off\n> This one would be covered with\n> GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n> the rest of the coverage would look different when passed through the various GIT_TEST_* options.\n>\n\nThanks for pointing out this GIT_TEST_* variable to me. I had been \nrunning builds with some of them enabled, but didn't know about this one.\n\nUnfortunately, t3406-rebase-message.sh fails with \nGIT_TEST_REBASE_USE_BUILTIN=false and it bisects to 4520c2337: Merge \nbranch 'ab/rebase-in-c-escape-hatch'.\n\nThe issue is that the commit 04519d72 \"rebase: validate -C<n> and \n--whitespace=<mode> parameters early\" introduced the following test that \ncares about error messages:\n\n+test_expect_success 'error out early upon -C<n> or --whitespace=<bad>' '\n+       test_must_fail git rebase -Cnot-a-number HEAD 2>err &&\n+       test_i18ngrep \"numerical value\" err &&\n+       test_must_fail git rebase --whitespace=bad HEAD 2>err &&\n+       test_i18ngrep \"Invalid whitespace option\" err\n+'\n\nThe merge commit then was the first place where this test could run with \nthat variable.\n\nWhat's the correct fix here? Force the builtin rebase in this test? \nUnify the error message in the non-builtin case?\n\nThanks,\n-Stolee\n"},{"id":"363679","messageId":"87va4szr2q.fsf@evledraar.gmail.com","threadId":"49853","inReplyTo":"6f0ff2e3-4019-1dcc-f61a-cd0919b9a247@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-19T21:37:49Z","receivedAt":"2018-11-19T21:37:54Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 19 2018, Derrick Stolee wrote:\n\n> On 11/19/2018 1:33 PM, Ævar Arnfjörð Bjarmason wrote:\n>> On Mon, Nov 19 2018, Derrick Stolee wrote:\n>>\n>>> [...]\n>>> builtin/rebase.c\n>>> 62c23938fa 55) return env;\n>>> [...]\n>>> Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n>>> where rebase.useBuiltin is off\n>> This one would be covered with\n>> GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n>> the rest of the coverage would look different when passed through the various GIT_TEST_* options.\n>>\n>\n> Thanks for pointing out this GIT_TEST_* variable to me. I had been\n> running builds with some of them enabled, but didn't know about this\n> one.\n>\n> Unfortunately, t3406-rebase-message.sh fails with\n> GIT_TEST_REBASE_USE_BUILTIN=false and it bisects to 4520c2337: Merge\n> branch 'ab/rebase-in-c-escape-hatch'.\n>\n> The issue is that the commit 04519d72 \"rebase: validate -C<n> and\n> --whitespace=<mode> parameters early\" introduced the following test\n> that cares about error messages:\n>\n> +test_expect_success 'error out early upon -C<n> or --whitespace=<bad>' '\n> + test_must_fail git rebase -Cnot-a-number HEAD 2>err &&\n> + test_i18ngrep \"numerical value\" err &&\n> + test_must_fail git rebase --whitespace=bad HEAD 2>err &&\n> + test_i18ngrep \"Invalid whitespace option\" err\n> +'\n>\n> The merge commit then was the first place where this test could run\n> with that variable.\n\nYup. Sorry should have mentioned that, it's broken in master. Reported\nit earlier today:\nhttps://public-inbox.org/git/874lcd1bub.fsf@evledraar.gmail.com/\n\n> What's the correct fix here? Force the builtin rebase in this test?\n> Unify the error message in the non-builtin case?\n\nProbably to just force the builtin, unless Johannes wants to also fix\nthe bug for the shellscript version. I don't know if for 2.20 we're\ntrying to maintain 100% compatibility.\n"},{"id":"363726","messageId":"20181120113423.GA29319@sigill.intra.peff.net","threadId":"49853","inReplyTo":"6f532502-d4b6-17f6-0ec7-01079077ac90@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-20T11:34:23Z","receivedAt":"2018-11-20T11:34:27Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 19, 2018 at 10:40:53AM -0500, Derrick Stolee wrote:\n\n> > 28b8a73080 builtin/pack-objects.c 2793) depth++;\n> > 108f530385 builtin/pack-objects.c 2797) oe_set_tree_depth(&to_pack, ent,\n> > depth);\n> \n> This 'depth' variable is incremented as part of a for loop in this patch:\n> \n>  static void show_object(struct object *obj, const char *name, void *data)\n> @@ -2686,6 +2706,19 @@ static void show_object(struct object *obj, const\n> char *name, void *data)\n>         add_preferred_base_object(name);\n>         add_object_entry(&obj->oid, obj->type, name, 0);\n>         obj->flags |= OBJECT_ADDED;\n> +\n> +       if (use_delta_islands) {\n> +               const char *p;\n> +               unsigned depth = 0;\n> +               struct object_entry *ent;\n> +\n> +               for (p = strchr(name, '/'); p; p = strchr(p + 1, '/'))\n> +                       depth++;\n> +\n> +               ent = packlist_find(&to_pack, obj->oid.hash, NULL);\n> +               if (ent && depth > ent->tree_depth)\n> +                       ent->tree_depth = depth;\n> +       }\n>  }\n> \n> And that 'ent->tree_depth = depth;' line is replaced with the\n> oe_set_tree_depth() call in the report.\n> \n> Since depth is never incremented, we are not covering this block. Is it\n> possible to test?\n\nThis should be covered by the fix in:\n\n  https://public-inbox.org/git/20181120095053.GC22742@sigill.intra.peff.net/\n\nbecause now entries at the top-level are depth \"1\". The \"depth++\" line\nis still never executed in our test suite. I'm not sure how much that\nmatters.\n\n> > delta-islands.c\n> > c8d521faf7  53) memcpy(b, old, size);\n> \n> This memcpy happens when the 'old' island_bitmap is passed to\n> island_bitmap_new(), but...\n> \n> > c8d521faf7 187) b->refcount--;\n> > c8d521faf7 188) b = kh_value(island_marks, pos) = island_bitmap_new(b);\n> \n> This block has the only non-NULL caller to island_bitmap_new().\n\nThis is another case where it triggers a lot for a reasonably-sized\nrepo, but it's hard to construct a small case. This code implements a\ncopy-on-write of the bitmap, which means the same objects have to be\naccessible from two different paths through the reachability graph, each\nwith different island marks. And then a test would I guess make sure\nthat the correct subsets of objects never become deltas, which gets\ncomplicated.\n\nAnd I think that's a pattern with the delta-island code. What we really\ncare about most is that if we throw a real fork-network repository at\nit, it produces faster clones with fewer un-reusable deltas. So I think\na much more interesting approach here would be perf tests. But:\n\n  - we'd want to count those as coverage, and that likely makes your\n    coverage tests prohibitively expensive\n\n  - it requires a specialized repo to demonstrate, which most people\n    aren't going to have handy\n\n> > c8d521faf7 212) obj = ((struct tag *)obj)->tagged;\n> > c8d521faf7 213) if (obj) {\n> > c8d521faf7 214) parse_object(the_repository, &obj->oid);\n> > c8d521faf7 215) marks = create_or_get_island_marks(obj);\n> > c8d521faf7 216) island_bitmap_set(marks, island_counter);\n> \n> It appears that this block would happen if we placed a tag in the delta\n> island.\n\nYep. Again, exercised by real repositories.\n\nI'm not sure how far we want to go in the blind pursuit of coverage.\nCertainly we could add a tag to the repo in t5320, and this code would\nget executed. But verifying that it's doing the right thing is much\nharder (and is more easily done with a perf test).\n\n> > c8d521faf7 397) strbuf_addch(&island_name, '-');\n> \n> This block is inside the following patch:\n> [...]\n\nYeah, this triggers if your regex has more than one capture group (and\nlikewise, we almost certainly don't run the \"you have too many groups\"\nwarning).\n\n> > c8d521faf7 433) continue;\n> > c8d521faf7 436) list[dst] = list[src];\n> \n> These blocks are inside the following nested loop in deduplicate_islands():\n> \n> +       for (ref = 0; ref + 1 < island_count; ref++) {\n> +               for (src = ref + 1, dst = src; src < island_count; src++) {\n> +                       if (list[ref]->hash == list[src]->hash)\n> +                               continue;\n> +\n> +                       if (src != dst)\n> +                               list[dst] = list[src];\n> +\n> +                       dst++;\n> +               }\n> +               island_count = dst;\n> +       }\n> \n> This means that our \"deduplication\" logic is never actually doing anything\n> meaningful.\n\nSorry, I don't even remember what this code is trying to do. The island\ncode is 5+ years old, and just recently ported to upstream Git by\nChristian. And that's perhaps part of my laziness in the above tests; it\nwould be a significant effort to re-figure out all these corner cases.\nIt's a big part of why I hadn't been sending the patches upstream\nmyself.\n\n-Peff\n"},{"id":"363731","messageId":"80690e4b-4fc4-7846-009f-59dee9fbdd86@gmail.com","threadId":"49853","inReplyTo":"20181120113423.GA29319@sigill.intra.peff.net","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-11-20T12:17:46Z","receivedAt":"2018-11-20T12:17:54Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 11/20/2018 6:34 AM, Jeff King wrote:\n> On Mon, Nov 19, 2018 at 10:40:53AM -0500, Derrick Stolee wrote:\n>\n>\n> Since depth is never incremented, we are not covering this block. Is it\n> possible to test?\n> This should be covered by the fix in:\n>\n>    https://public-inbox.org/git/20181120095053.GC22742@sigill.intra.peff.net/\n>\n> because now entries at the top-level are depth \"1\". The \"depth++\" line\n> is still never executed in our test suite. I'm not sure how much that\n> matters.\n\nThanks! I'll go take a look at your patch.\n\n>>> delta-islands.c\n>>> c8d521faf7  53) memcpy(b, old, size);\n>> This memcpy happens when the 'old' island_bitmap is passed to\n>> island_bitmap_new(), but...\n>>\n>>> c8d521faf7 187) b->refcount--;\n>>> c8d521faf7 188) b = kh_value(island_marks, pos) = island_bitmap_new(b);\n>> This block has the only non-NULL caller to island_bitmap_new().\n> This is another case where it triggers a lot for a reasonably-sized\n> repo, but it's hard to construct a small case. This code implements a\n> copy-on-write of the bitmap, which means the same objects have to be\n> accessible from two different paths through the reachability graph, each\n> with different island marks. And then a test would I guess make sure\n> that the correct subsets of objects never become deltas, which gets\n> complicated.\n>\n> And I think that's a pattern with the delta-island code. What we really\n> care about most is that if we throw a real fork-network repository at\n> it, it produces faster clones with fewer un-reusable deltas. So I think\n> a much more interesting approach here would be perf tests. But:\n>\n>    - we'd want to count those as coverage, and that likely makes your\n>      coverage tests prohibitively expensive\n>\n>    - it requires a specialized repo to demonstrate, which most people\n>      aren't going to have handy\n\nDo you have regularly-running tests that check this in your \ninfrastructure? As long as someone would notice if this code starts \nfailing, that would be enough.\n\n>>> c8d521faf7 212) obj = ((struct tag *)obj)->tagged;\n>>> c8d521faf7 213) if (obj) {\n>>> c8d521faf7 214) parse_object(the_repository, &obj->oid);\n>>> c8d521faf7 215) marks = create_or_get_island_marks(obj);\n>>> c8d521faf7 216) island_bitmap_set(marks, island_counter);\n>> It appears that this block would happen if we placed a tag in the delta\n>> island.\n> Yep. Again, exercised by real repositories.\n>\n> I'm not sure how far we want to go in the blind pursuit of coverage.\n> Certainly we could add a tag to the repo in t5320, and this code would\n> get executed. But verifying that it's doing the right thing is much\n> harder (and is more easily done with a perf test).\n\nBlind coverage goals are definitely not worth the effort. My goal here \nwas to re-check all of the new code (since last release) that is not \ncovered, because it's easier to hide a bug there.\n\n>\n>>> c8d521faf7 397) strbuf_addch(&island_name, '-');\n>> This block is inside the following patch:\n>> [...]\n> Yeah, this triggers if your regex has more than one capture group (and\n> likewise, we almost certainly don't run the \"you have too many groups\"\n> warning).\n\nDid you know that regexes are notoriously under-tested [1]? When looking \nat this code, I didn't even know regexes were involved (but I didn't \nlook enough at the context).\n\n[1] https://dl.acm.org/citation.cfm?id=3236072\n\n>\n>>> c8d521faf7 433) continue;\n>>> c8d521faf7 436) list[dst] = list[src];\n>> These blocks are inside the following nested loop in deduplicate_islands():\n>>\n>> +       for (ref = 0; ref + 1 < island_count; ref++) {\n>> +               for (src = ref + 1, dst = src; src < island_count; src++) {\n>> +                       if (list[ref]->hash == list[src]->hash)\n>> +                               continue;\n>> +\n>> +                       if (src != dst)\n>> +                               list[dst] = list[src];\n>> +\n>> +                       dst++;\n>> +               }\n>> +               island_count = dst;\n>> +       }\n>>\n>> This means that our \"deduplication\" logic is never actually doing anything\n>> meaningful.\n> Sorry, I don't even remember what this code is trying to do. The island\n> code is 5+ years old, and just recently ported to upstream Git by\n> Christian. And that's perhaps part of my laziness in the above tests; it\n> would be a significant effort to re-figure out all these corner cases.\n> It's a big part of why I hadn't been sending the patches upstream\n> myself.\n\nSure. Hopefully pointing out these blocks gives us more motivation to \nmanually inspect them and avoid silly bugs.\n\nThanks,\n-Stolee\n"},{"id":"363734","messageId":"20181120124033.GA7596@sigill.intra.peff.net","threadId":"49853","inReplyTo":"80690e4b-4fc4-7846-009f-59dee9fbdd86@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-20T12:40:34Z","receivedAt":"2018-11-20T12:40:37Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 20, 2018 at 07:17:46AM -0500, Derrick Stolee wrote:\n\n> > And I think that's a pattern with the delta-island code. What we really\n> > care about most is that if we throw a real fork-network repository at\n> > it, it produces faster clones with fewer un-reusable deltas. So I think\n> > a much more interesting approach here would be perf tests. But:\n> > \n> >    - we'd want to count those as coverage, and that likely makes your\n> >      coverage tests prohibitively expensive\n> > \n> >    - it requires a specialized repo to demonstrate, which most people\n> >      aren't going to have handy\n> \n> Do you have regularly-running tests that check this in your infrastructure?\n> As long as someone would notice if this code starts failing, that would be\n> enough.\n\nWe do integration tests, and this feature gets exercised quite a bit in\nproduction at GitHub. But none of that caught the breakage I fixed this\nmorning for the simple fact that we don't keep up with upstream master\nin real-time. We're running the delta-island code I wrote years ago, and\nthe bug was introduced by the upstreaming. Probably in a month or three\nI'll merge v2.20 into our fork, and we would have noticed then.\n\nI've had dreams of following upstream more closely, but there are two\nblockers:\n\n  - we have enough custom bits that the merges are time-consuming (and\n    introduce the possibility of funny interactions or regressions). I'd\n    like to reduce our overall diff from upstream, but it's slow going\n    and time is finite. (And ironically, it's made harder in some ways\n    by the lag, because many of our topics are backports of things I\n    send upstream).\n\n  - deploying the \".0\" release from master can be scary. For instance, I\n    was really happy to have a fix for 9ac3f0e5b3 (pack-objects: fix\n    performance issues on packing large deltas, 2018-07-22) before\n    putting the bug into production.\n\n> > Yeah, this triggers if your regex has more than one capture group (and\n> > likewise, we almost certainly don't run the \"you have too many groups\"\n> > warning).\n> \n> Did you know that regexes are notoriously under-tested [1]? When looking at\n> this code, I didn't even know regexes were involved (but I didn't look\n> enough at the context).\n> \n> [1] https://dl.acm.org/citation.cfm?id=3236072\n\nHeh. Well, fortunately we are compiling regexes from the user's config,\nso it's not Git's fault if the regexes are bad. ;)\n\n(Of course on our production servers I'm on the hook for both sides!)\n\n-Peff\n"},{"id":"363780","messageId":"nycvar.QRO.7.76.6.1811202142440.41@tvgsbejvaqbjf.bet","threadId":"49853","inReplyTo":"6f0ff2e3-4019-1dcc-f61a-cd0919b9a247@gmail.com","subject":"Re: Git Test Coverage Report (v2.20.0-rc0)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-11-20T20:43:18Z","receivedAt":"2018-11-20T20:43:37Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Stolee,\n\nOn Mon, 19 Nov 2018, Derrick Stolee wrote:\n\n> On 11/19/2018 1:33 PM, Ævar Arnfjörð Bjarmason wrote:\n> > On Mon, Nov 19 2018, Derrick Stolee wrote:\n> >\n> > > [...]\n> > > builtin/rebase.c\n> > > 62c23938fa 55) return env;\n> > > [...]\n> > > Ævar Arnfjörð Bjarmason 62c23938f: tests: add a special setup\n> > > where rebase.useBuiltin is off\n> > This one would be covered with\n> > GIT_TEST_REBASE_USE_BUILTIN=false. Obviously trivial, but I wonder if\n> > the rest of the coverage would look different when passed through the\n> > various GIT_TEST_* options.\n> >\n> \n> Thanks for pointing out this GIT_TEST_* variable to me. I had been running\n> builds with some of them enabled, but didn't know about this one.\n> \n> Unfortunately, t3406-rebase-message.sh fails with\n> GIT_TEST_REBASE_USE_BUILTIN=false and it bisects to 4520c2337: Merge branch\n> 'ab/rebase-in-c-escape-hatch'.\n> \n> The issue is that the commit 04519d72 \"rebase: validate -C<n> and\n> --whitespace=<mode> parameters early\" introduced the following test that cares\n> about error messages:\n> \n> +test_expect_success 'error out early upon -C<n> or --whitespace=<bad>' '\n> +       test_must_fail git rebase -Cnot-a-number HEAD 2>err &&\n> +       test_i18ngrep \"numerical value\" err &&\n> +       test_must_fail git rebase --whitespace=bad HEAD 2>err &&\n> +       test_i18ngrep \"Invalid whitespace option\" err\n> +'\n> \n> The merge commit then was the first place where this test could run with that\n> variable.\n> \n> What's the correct fix here? Force the builtin rebase in this test? Unify the\n> error message in the non-builtin case?\n\nI am obviously biased, but my take is that the correct fix is in\nhttps://public-inbox.org/git/pull.86.git.gitgitgadget@gmail.com\n\nCiao,\nDscho"}]}