pu 4da9d1ed5116f89b015c733206b4b7e61883f8bb
jch 0001df5574e7f7a096d568fb64aeb26e5fe2757a
next ca9f1ec99ff3ed584eec58c085a342c9c37d2919
master 0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6
master@{1} b02fd2accad4d48078671adf38fe5b5976d77304

Uncovered code in 'pu' not in 'jch'

pu 4da9d1ed5116f89b015c733206b4b7e61883f8bb
jch 0001df5574e7f7a096d568fb64aeb26e5fe2757a

add-patch.c

60b7e674 1156 int res = read_key_without_echo(&s->answer);
60b7e674 1157 printf("%s\n", res == EOF ? "" : s->answer.buf);
60b7e674 1158 return res;
52628f94 1272 fwrite(diff->buf, diff->len, 1, stderr);
d2a233cb 1567 _(s->mode->help_patch_text));

builtin/add.c

90a6bb98 450 parse_pathspec(&pathspec, 0,
90a6bb98 456 return run_add_interactive(NULL, "--patch=stash", &pathspec);

builtin/commit.c

builtin/grep.c

builtin/rebase.c

afc27b82 648 } else if (!read_oneliner(&buf, state_dir_path("head", opts), 0, 1))
d4e8a655 904 reset_head(the_repository, &opts->orig_head, "checkout",
d4e8a655 905 opts->head_name, 0,
82c638ef 1065 apply_autostash(state_dir_path("autostash", opts));

builtin/stash.c

6610e462 1026 setenv(INDEX_ENVIRONMENT, old_index_env, 1);

compat/terminal.c

aaafd603 38 static int disable_bits(tcflag_t bits)
aaafd603 49 t.c_lflag &= ~bits;
aaafd603 59 static int disable_echo(void)
aaafd603 61 return disable_bits(ECHO);
74e42899 64 static int enable_non_canonical(void)
74e42899 66 return disable_bits(ICANON | ECHO);
61131685 255 static int sequence_entry_cmp(const void *hashmap_cmp_fn_data,
61131685 260 return strcmp(e1->sequence, keydata ? keydata : e2->sequence);
61131685 263 static int is_known_escape_sequence(const char *sequence)
61131685 268 if (!initialized) {
61131685 269 struct child_process cp = CHILD_PROCESS_INIT;
61131685 270 struct strbuf buf = STRBUF_INIT;
61131685 273 hashmap_init(&sequences, (hashmap_cmp_fn)sequence_entry_cmp,
61131685 276 argv_array_pushl(&cp.args, "infocmp", "-L", "-1", NULL);
61131685 277 if (pipe_command(&cp, NULL, 0, &buf, 0, NULL, 0))
61131685 278 strbuf_setlen(&buf, 0);
61131685 280 for (eol = p = buf.buf; *p; p = eol + 1) {
61131685 281 p = strchr(p, '=');
61131685 282 if (!p)
61131685 283 break;
61131685 284 p++;
61131685 285 eol = strchrnul(p, '\n');
61131685 287 if (starts_with(p, "\\E")) {
61131685 288 char *comma = memchr(p, ',', eol - p);
61131685 291 p[0] = '^';
61131685 292 p[1] = '[';
61131685 293 FLEX_ALLOC_MEM(e, sequence, p, comma - p);
61131685 294 hashmap_entry_init(&e->entry,
61131685 295 strhash(e->sequence));
61131685 296 hashmap_add(&sequences, &e->entry);
61131685 298 if (!*eol)
61131685 299 break;
61131685 301 initialized = 1;
61131685 304 return !!hashmap_get_from_hash(&sequences, strhash(sequence), sequence);
74e42899 307 int read_key_without_echo(struct strbuf *buf)
74e42899 312 if (warning_displayed || enable_non_canonical() < 0) {
74e42899 313 if (!warning_displayed) {
74e42899 316 warning_displayed = 1;
74e42899 319 return strbuf_getline(buf, stdin);
74e42899 322 strbuf_reset(buf);
74e42899 323 ch = getchar();
74e42899 324 if (ch == EOF) {
74e42899 325 restore_term();
74e42899 326 return EOF;
74e42899 328 strbuf_addch(buf, ch);
53fa2153 330 if (ch == '\033' /* ESC */) {
53fa2153 338 strbuf_splice(buf, buf->len - 1, 1, "^[", 2);
61131685 345 while (!is_known_escape_sequence(buf->buf)) {
53fa2153 346 struct pollfd pfd = { .fd = 0, .events = POLLIN };
53fa2153 348 if (poll(&pfd, 1, 500) < 1)
53fa2153 349 break;
53fa2153 351 ch = getchar();
53fa2153 352 if (ch == EOF)
53fa2153 353 return 0;
53fa2153 354 strbuf_addch(buf, ch);
74e42899 358 restore_term();
74e42899 359 return 0;

packfile.c

beebb9d2 1453 return;

protocol.c

read-cache.c

ee70c128 1761 if (advice_unknown_index_extension) {

remote-curl.c

6da1f1a9 354 return 0;

reset.c

f2096173 37 ret = -1;
f2096173 38 goto leave_reset_head;
f2096173 43 goto leave_reset_head;
f2096173 65 goto leave_reset_head;
f2096173 71 goto leave_reset_head;
f2096173 76 goto leave_reset_head;
f2096173 80 ret = -1;
f2096173 81 goto leave_reset_head;
f2096173 89 goto leave_reset_head;
f2096173 108 } else if (old_orig)
f2096173 109 delete_ref(NULL, "ORIG_HEAD", old_orig, 0);

sequencer.c

daf6b9e4 439 goto done;
daf6b9e4 445 goto done;
430b75f7 1580 return -1;

sha1-file.c

beebb9d2 1431 return;
beebb9d2 1440 return;

Commits introducing uncovered code:

Denton Liu 38ac131a sequencer: extract perform_autostash() from rebase
Denton Liu daf6b9e4 sequencer: use file strbuf for read_oneliner()
Denton Liu f2096173 reset: extract reset_head() from rebase
Denton Liu afc27b82 rebase: use read_oneliner()
Denton Liu d4e8a655 rebase: generify reset_head()
Denton Liu 82c638ef rebase: use apply_autostash() from sequencer.c
Emily Shaffer fae9bc5a grep: support the --pathspec-from-file option
Johannes Schindelin 53fa2153 built-in add -p: handle Escape sequences in interactive.singlekey mode
Johannes Schindelin 61131685 built-in add -p: handle Escape sequences more efficiently
Johannes Schindelin 74e42899 terminal: add a new function to read a single keystroke
Johannes Schindelin aaafd603 terminal: make the code of disable_echo() reusable
Johannes Schindelin 6610e462 built-in stash: use the built-in `git add -p` if so configured
Johannes Schindelin 90a6bb98 legacy stash -p: respect the add.interactive.usebuiltin setting
Johannes Schindelin d2a233cb built-in add -p: prepare for patch modes other than "stage"
Johannes Schindelin 52628f94 built-in add -p: implement the "checkout" patch modes
Johannes Schindelin 60b7e674 built-in add -p: respect the `interactive.singlekey` config setting
Johannes Schindelin ad9af7e8 built-in add -p: support interactive.diffFilter
Jonathan Nieder ee70c128 index: offer advice for unknown index extensions
Josh Steadmon 6da1f1a9 protocol: advertise multiple supported versions
Matheus Tavares beebb9d2 object-store: allow threaded access to object reading
Phillip Wood 430b75f7 commit: give correct advice for empty commit during a rebase
Phillip Wood 012ecfce rebase: fix advice when a fixup creates an empty commit

Uncovered code in 'jch' not in 'next'

jch 0001df5574e7f7a096d568fb64aeb26e5fe2757a
next ca9f1ec99ff3ed584eec58c085a342c9c37d2919

builtin/config.c

3bf986d6 329 FREE_AND_NULL(cmd_line_value.regexp);
3bcdd852 330 return CONFIG_INVALID_PATTERN;
3bcdd852 375 goto free_strings;

builtin/merge-base.c

fed842f0 128 return 1;

builtin/pull.c

917ddb16 374 return status;

builtin/rebase.c

4d861fad 725 write_file(state_dir_path("quiet", opts), "%s", "");

gpg-interface.c

917ddb16 143 return 1;
917ddb16 209 free(trust);
917ddb16 210 goto error;
917ddb16 399 return config_error_nonbool(var);

pretty.c

917ddb16 1355 strbuf_addstr(sb, "never");
917ddb16 1356 break;
917ddb16 1358 strbuf_addstr(sb, "marginal");
917ddb16 1359 break;
917ddb16 1361 strbuf_addstr(sb, "fully");
917ddb16 1362 break;

rebase-interactive.c

0d50cf5e 210 goto out;
0d50cf5e 215 goto out;
0d50cf5e 224 fprintf(stderr, _(edit_todo_list_advice));

refs.c

sequencer.c

7ee11336 2055 res = allow;
7ee11336 2056 goto leave;
7ee11336 2515 opts->drop_redundant_commits =
7ee11336 2516 git_config_bool_or_int(key, value, &error_flag);
7ee11336 2521 opts->ask_on_initially_empty =
7ee11336 2522 git_config_bool_or_int(key, value, &error_flag);
7ee11336 3066 res |= git_config_set_in_file_gently(opts_file,
7ee11336 3072 res |= git_config_set_in_file_gently(opts_file,
7ee11336 4798 continue;

Commits introducing uncovered code:

Alban Gruin 5ef50d63 rebase-interactive: warn if commit is dropped with `rebase --edit-todo'
Alban Gruin 0d50cf5e sequencer: move check_todo_list_from_file() to rebase-interactive.c
Alex Torok fed842f0 rebase: fix --fork-point with short refname
Elijah Newren 4d861fad rebase, sequencer: remove the broken GIT_QUIET handling
Elijah Newren 7ee11336 rebase: extend the options for handling of empty commits
Elijah Newren e8c1d7e0 rebase: make the backend configurable via config setting
Hans Jerry Illikainen 917ddb16 gpg-interface: add minTrustLevel as a configuration option
Martin Ã…gren 3bf986d6 builtin/config: collect "value_regexp" data in a struct
Martin Ã…gren 3bcdd852 builtin/config: extract `handle_value_regex()` from `get_value()`

Uncovered code in 'next' not in 'master'

next ca9f1ec99ff3ed584eec58c085a342c9c37d2919
master 0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6

builtin/pack-objects.c

4f0bd8b9 1124 return 1;
4f0bd8b9 2681 (reuse_packfile_bitmap &&
4f0bd8b9 2682 bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));
7cb9754e 2834 allow_pack_reuse = git_config_bool(k, v);
7cb9754e 2835 return 0;

builtin/rebase.c

4fe7e43c 709 write_file(state_dir_path("signoff", opts), "--signoff");

pack-bitmap.c

4f0bd8b9 808 return;
4f0bd8b9 811 return;
4f0bd8b9 823 return;
4f0bd8b9 861 i = bitmap_git->pack->num_objects / BITS_IN_EWORD;
7b143c16 903 return 0;

Commits introducing uncovered code:

Elijah Newren 4fe7e43c rebase: fix saving of --signoff state for am-based rebases
Jeff King 4f0bd8b9 pack-objects: improve partial packfile reuse
Jeff King 7cb9754e pack-objects: introduce pack.allowPackReuse
Jeff King 7b143c16 pack-bitmap: introduce bitmap_walk_contains()

Uncovered code in 'master' not in 'master@{1}'

master 0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6
master@{1} b02fd2accad4d48078671adf38fe5b5976d77304

add-patch.c

7584dd3c 52 static void err(struct add_p_state *s, const char *fmt, ...)
7584dd3c 56 va_start(args, fmt);
7584dd3c 57 fputs(s->s.error_color, stderr);
7584dd3c 58 vfprintf(stderr, fmt, args);
7584dd3c 59 fputs(s->s.reset_color, stderr);
7584dd3c 60 fputc('\n', stderr);
7584dd3c 61 va_end(args);
7584dd3c 62 }
25ea47af 87 return -1;
25ea47af 104 eol = s->plain.buf + s->plain.len;
25ea47af 127 eol = s->colored.buf + s->colored.len;
5906d5de 146 return 0;
5906d5de 150 return 0;
e3bd11b4 175 argv_array_clear(&args);
f6aa7ecc 209 eol = pend;
510aeca1 235 hunk->splittable_into++;
25ea47af 250 return -1;
5906d5de 277 file_diff->hunk->colored_start =
5906d5de 278 colored_p - colored->buf;
e3bd11b4 320 colored_p = colored_pend;
510aeca1 356 return sb->len;
25ea47af 393 strbuf_addf(out, "%s\n", GIT_COLOR_RESET);
5906d5de 425 const char *p = s->colored.buf;
5906d5de 427 strbuf_add(out, p + head->colored_start,
5906d5de 428 first->colored_start - head->colored_start);
5906d5de 429 strbuf_add(out, p + first->colored_end,
5906d5de 430 head->colored_end - first->colored_end);
11f2c0da 449 return 0;
510aeca1 618 return 0;
510aeca1 629 memmove(file_diff->hunk + hunk_index + splittable_into,
510aeca1 630 file_diff->hunk + hunk_index + 1,
510aeca1 631 (file_diff->hunk_nr - hunk_index - splittable_into)
510aeca1 642 colored_current = hunk->colored_start;
510aeca1 660 hunk[1].colored_start = colored_current;
510aeca1 675 ch = marker ? marker : ' ';
510aeca1 689 colored_current =
510aeca1 690 find_next_line(&s->colored,
510aeca1 732 hunk->colored_end = colored_current;
510aeca1 757 hunk->colored_end = colored_end;
bcdd297b 770 hunk->colored_start = s->colored.len;
bcdd297b 771 for (current = hunk->start; current < hunk->end; ) {
bcdd297b 772 for (eol = current; eol < hunk->end; eol++)
bcdd297b 773 if (plain[eol] == '\n')
bcdd297b 774 break;
bcdd297b 775 next = eol + (eol < hunk->end);
bcdd297b 776 if (eol > current && plain[eol - 1] == '\r')
bcdd297b 777 eol--;
bcdd297b 779 strbuf_addstr(&s->colored,
bcdd297b 780 plain[current] == '-' ?
bcdd297b 782 plain[current] == '+' ?
bcdd297b 785 strbuf_add(&s->colored, plain + current, eol - current);
bcdd297b 786 strbuf_addstr(&s->colored, GIT_COLOR_RESET);
bcdd297b 787 if (next > eol)
bcdd297b 788 strbuf_add(&s->colored, plain + eol, next - eol);
bcdd297b 789 current = next;
bcdd297b 791 hunk->colored_end = s->colored.len;
bcdd297b 825 return -1;
bcdd297b 840 return 0;
bcdd297b 906 return -1;
bcdd297b 910 case 'y': return 1;
bcdd297b 912 }
bcdd297b 927 *hunk = backup;
bcdd297b 928 return -1;
9254bdfb 981 strbuf_setlen(out, len + SUMMARY_LINE_WIDTH);
f6aa7ecc 1051 undecided_previous = i;
f6aa7ecc 1052 break;
f6aa7ecc 1073 strbuf_addstr(&s->buf, ",k");
f6aa7ecc 1107 continue;
80399aec 1118 for (; hunk_index < file_diff->hunk_nr; hunk_index++) {
80399aec 1119 hunk = file_diff->hunk + hunk_index;
f6aa7ecc 1120 if (hunk->use == UNDECIDED_HUNK)
f6aa7ecc 1121 hunk->use = USE_HUNK;
7584dd3c 1134 if (hunk_index)
7584dd3c 1135 hunk_index--;
7584dd3c 1137 err(s, _("No previous hunk"));
80399aec 1139 if (hunk_index + 1 < file_diff->hunk_nr)
7584dd3c 1140 hunk_index++;
7584dd3c 1142 err(s, _("No next hunk"));
7584dd3c 1144 if (undecided_previous >= 0)
7584dd3c 1145 hunk_index = undecided_previous;
7584dd3c 1147 err(s, _("No previous hunk"));
7584dd3c 1149 if (undecided_next >= 0)
7584dd3c 1150 hunk_index = undecided_next;
7584dd3c 1152 err(s, _("No next hunk"));
9254bdfb 1158 err(s, _("No other hunks to goto"));
9254bdfb 1159 continue;
9254bdfb 1174 break;
9254bdfb 1181 err(s, _("Invalid number: '%s'"),
9254bdfb 1189 (int)file_diff->hunk_nr);
d6cf8733 1195 err(s, _("No other hunks to search"));
d6cf8733 1196 continue;
d6cf8733 1201 printf("%s", _("search for regex? "));
d6cf8733 1202 fflush(stdout);
d6cf8733 1203 if (strbuf_getline(&s->answer,
d6cf8733 1205 break;
d6cf8733 1206 strbuf_trim_trailing_newline(&s->answer);
d6cf8733 1207 if (s->answer.len == 0)
d6cf8733 1208 continue;
d6cf8733 1216 err(s, _("Malformed search regexp %s: %s"),
d6cf8733 1218 continue;
d6cf8733 1233 err(s, _("No hunk matches the given pattern"));
d6cf8733 1234 break;
510aeca1 1240 err(s, _("Sorry, cannot split this hunk"));
bcdd297b 1248 err(s, _("Sorry, cannot edit this hunk"));
54d9d9b2 1254 const char *p = _(help_patch_remainder), *eol = p;
54d9d9b2 1256 color_fprintf(stdout, s->s.help_color, "%s",
54d9d9b2 1263 for (; *p; p = eol + (*eol == '\n')) {
54d9d9b2 1264 eol = strchrnul(p, '\n');
54d9d9b2 1271 if (*p != '?' && !strchr(s->buf.buf, *p))
54d9d9b2 1272 continue;
54d9d9b2 1274 color_fprintf_ln(stdout, s->s.help_color,
54d9d9b2 1275 "%.*s", (int)(eol - p), p);
25ea47af 1296 repo_refresh_and_write_index(s->s.r, REFRESH_QUIET, 0,
f6aa7ecc 1317 strbuf_release(&s.plain);
e3bd11b4 1318 strbuf_release(&s.colored);
f6aa7ecc 1319 return -1;

builtin/add.c

builtin/bisect--helper.c

51a0a4ed 177 return -1;

builtin/checkout.c

builtin/clone.c

d89f09c8 753 result = 1;
d89f09c8 1132 return 1;

builtin/sparse-checkout.c

e091228e 85 return 0;
bab3c359 221 return 1;
bab3c359 275 return 1;
190a65f9 337 strihash(e->pattern) :
af09ce24 352 return;

dir.c

96cc8ab5 663 pl->use_cone_patterns = 0;
96cc8ab5 665 goto clear_hashmaps;
190a65f9 676 strihash(translated->pattern) :
96cc8ab5 689 hashmap_add(&pl->parent_hashmap, &translated->ent);
96cc8ab5 690 hashmap_remove(&pl->recursive_hashmap, &translated->ent, &data);
96cc8ab5 691 free(data);
96cc8ab5 692 return;
96cc8ab5 698 goto clear_hashmaps;
190a65f9 707 strihash(translated->pattern) :
96cc8ab5 716 hashmap_remove(&pl->parent_hashmap, &translated->ent, &data);
96cc8ab5 717 free(data);
96cc8ab5 718 free(translated);
96cc8ab5 1280 return MATCHED;

strbuf.c

b38dd9e7 1140 res = error_errno(_("could not open '%s' for writing"), path);
b38dd9e7 1142 res = error_errno(_("could not write to '%s'"), path);
b38dd9e7 1143 close(fd);
b38dd9e7 1145 res = error_errno(_("could not close '%s'"), path);
b38dd9e7 1149 res = error_errno(_("could not edit '%s'"), path);

Commits introducing uncovered code:

Alexandr Miloslavskiy bebb5d6d add: support the --pathspec-from-file option
Alexandr Miloslavskiy a9aecc7a checkout, restore: support the --pathspec-from-file option
Derrick Stolee 96cc8ab5 sparse-checkout: use hashmaps for cone patterns
Derrick Stolee 94c0956b sparse-checkout: create builtin with 'list' subcommand
Derrick Stolee 72918c1a sparse-checkout: create 'disable' subcommand
Derrick Stolee af09ce24 sparse-checkout: init and set in cone mode
Derrick Stolee 190a65f9 sparse-checkout: respect core.ignoreCase in cone mode
Derrick Stolee 416adc87 sparse-checkout: update working directory in-process for 'init'
Derrick Stolee bab3c359 sparse-checkout: create 'init' subcommand
Derrick Stolee e091228e sparse-checkout: update working directory in-process
Derrick Stolee d89f09c8 clone: add --sparse mode
Johannes Schindelin 5906d5de built-in app -p: allow selecting a mode change as a "hunk"
Johannes Schindelin 25ea47af built-in add -p: adjust hunk headers as needed
Johannes Schindelin 7584dd3c built-in add -p: offer a helpful error message when hunk navigation failed
Johannes Schindelin 54d9d9b2 built-in add -p: only show the applicable parts of the help text
Johannes Schindelin d6cf8733 built-in add -p: implement the '/' ("search regex") command
Johannes Schindelin 80399aec built-in add -p: support multi-file diffs
Johannes Schindelin 9254bdfb built-in add -p: implement the 'g' ("goto") command
Johannes Schindelin bcdd297b built-in add -p: implement hunk editing
Johannes Schindelin 11f2c0da built-in add -p: coalesce hunks after splitting them
Johannes Schindelin 510aeca1 built-in add -p: implement the hunk splitting feature
Johannes Schindelin f6aa7ecc built-in add -i: start implementing the `patch` functionality in C
Johannes Schindelin e3bd11b4 built-in add -p: show colored hunks by default
Johannes Schindelin b38dd9e7 strbuf: add a helper function to call the editor "on an strbuf"
Tanushree Tumane 51a0a4ed bisect--helper: avoid use-after-free