{"thread":{"id":"50268","subject":"Git Test Coverage Report (Sat Jan 19)","startedAt":"2019-01-20T01:07:23Z","lastAt":"2019-01-24T20:56:28Z","messageCount":5,"participants":["Derrick Stolee","Junio C Hamano","Ramsay Jones"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"367196","messageId":"6addc879-a792-202f-2aeb-7097ea344894@gmail.com","threadId":"50268","inReplyTo":null,"subject":"Git Test Coverage Report (Sat Jan 19)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-01-20T01:07:07Z","receivedAt":"2019-01-20T01:07:23Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"Here is today's test coverage report.\n\nAlso, there has been some feedback that it can be hard to manually match \nup uncovered lines with names at the bottom of the summary. The \nsuggestion was to auto-generate an HTML report that could be posted to a \npublic page and referenced in this mail for those who prefer that. Any \nsuggestions for how that should look before we start building it?\n\nThanks,\n\n-Stolee\n\n[1] https://dev.azure.com/git/git/_build/results?buildId=307\n\n---\n\npu: 32ea0d952e6add9269432e6e2b31fd552e5478c0\njch: bc1fa105c1c1d5870a7e2800526f0a7ebf17d064\nnext: aa96b0ce6b0fa4fa4cc6870f1a3aff3878967bfa\nmaster: 16a465bc018d09e9d7bbbdc5f40a7fb99c21f8ef\nmaster@{1}: 77556354bb7ac50450e3b28999e3576969869068\n\nUncovered code in 'pu' not in 'jch'\n--------------------------------------\n\nbisect.c\n4f6d26b167  661) mark_edges_uninteresting(revs, NULL, 0);\n\nblame.c\ne1ff0a32e4  191) repo_read_index(r);\ne1ff0a32e4  273) repo_read_index(r);\n07d04b919e  482)     ent->s_lno + ent->num_lines == next->s_lno &&\n07d04b919e  483)     ent->ignored == next->ignored) {\n07d04b919e  735) split[0].ignored = split[1].ignored = split[2].ignored \n= e->ignored;\ne7973c8519  859) struct blame_entry *samep = NULL, *diffp = NULL, \n*ignoredp = NULL;\n07d04b919e  873) n->ignored = e->ignored;\n07d04b919e  928) n->ignored = e->ignored;\ne7973c8519  938) if (ignore_diffs) {\ne7973c8519  940) blame_origin_decref(e->suspect);\ne7973c8519  941) e->suspect = blame_origin_incref(parent);\ne7973c8519  942) e->s_lno += offset;\n07d04b919e  943) e->ignored = 1;\ne7973c8519  944) e->next = ignoredp;\ne7973c8519  945) ignoredp = e;\ne7973c8519  947) e->next = diffp;\ne7973c8519  948) diffp = e;\ne7973c8519  952) if (ignoredp) {\ne7973c8519  953) **dstq = reverse_blame(ignoredp, **dstq);\ne7973c8519  954) *dstq = &ignoredp->next;\ne7973c8519 1001) d.ignore_diffs = ignore_diffs;\ne7973c8519 1013) blame_chunk(&d.dstq, &d.srcq, INT_MAX, d.offset, \nINT_MAX, parent, 0);\ne7973c8519 1518) pass_blame_to_parent(sb, origin, porigin, 0);\ne7973c8519 1526) if (oidset_contains(&sb->ignore_list, \n&commit->object.oid)) {\ne7973c8519 1527) for (i = 0, sg = first_scapegoat(revs, commit, \nsb->reverse);\ne7973c8519 1528)      i < num_sg && sg;\ne7973c8519 1529)      sg = sg->next, i++) {\ne7973c8519 1530) struct blame_origin *porigin = sg_origin[i];\ne7973c8519 1532) if (!porigin)\ne7973c8519 1533) continue;\ne7973c8519 1534) pass_blame_to_parent(sb, origin, porigin, 1);\ne7973c8519 1535) if (!origin->suspects)\ne7973c8519 1536) goto finish;\n\nbuiltin/am.c\n1d18d7581c  515) finish_copy_notes_for_rewrite(the_repository, c, msg);\n150fe065f7 1765)     !repo_index_has_changes(the_repository, NULL, NULL)) {\n150fe065f7 1819) if (!repo_index_has_changes(the_repository, NULL, NULL)) {\n\nbuiltin/blame.c\n07d04b919e builtin/blame.c    484) if (mark_ignored_lines && ent->ignored) {\n07d04b919e builtin/blame.c    485) length--;\n07d04b919e builtin/blame.c    486) putchar('*');\ne7973c8519 builtin/blame.c    704) if (!strcmp(var, \"blame.ignorerevsfile\"))\ne7973c8519 builtin/blame.c    705) return \ngit_config_pathname(&ignore_revs_file, var, value);\n07d04b919e builtin/blame.c    706) if (!strcmp(var, \n\"blame.markignoredlines\")) {\n07d04b919e builtin/blame.c    707) mark_ignored_lines = \ngit_config_bool(var, value);\n07d04b919e builtin/blame.c    708) return 0;\ne7973c8519 builtin/blame.c    789) static void build_ignorelist(struct \nblame_scoreboard *sb,\ne7973c8519 builtin/blame.c    795) oidset_init(&sb->ignore_list, 0);\ne7973c8519 builtin/blame.c    796) if (ignore_revs_file)\ne7973c8519 builtin/blame.c    797) oidset_parse_file(&sb->ignore_list, \nignore_revs_file);\ne7973c8519 builtin/blame.c    798) for_each_string_list_item(i, \nignore_rev_list) {\ne7973c8519 builtin/blame.c    799) if (get_oid_committish(i->string, &oid))\ne7973c8519 builtin/blame.c    800) die(_(\"Can't find revision '%s' to \nignore\"), i->string);\ne7973c8519 builtin/blame.c    801) oidset_insert(&sb->ignore_list, &oid);\ne7973c8519 builtin/blame.c    803) }\nacdd37769d builtin/blame.c    961) blame_date_width = sizeof(\"Thu Oct 19 \n16:00\");\nacdd37769d builtin/blame.c    962) break;\ne7973c8519 builtin/blame.c   1033) build_ignorelist(&sb, &ignore_rev_list);\ne7973c8519 builtin/blame.c   1034) string_list_clear(&ignore_rev_list, 0);\n4478671442 builtin/blame.c   1048) the_repository->index))\n\nbuiltin/checkout.c\n0d6caa2d08 builtin/checkout.c  751) init_merge_options(&o, the_repository);\n\nbuiltin/commit.c\n1d18d7581c builtin/commit.c 1689) commit_post_rewrite(the_repository, \ncurrent_head, &oid);\n\nbuiltin/config.c\na12c1ff3a5 builtin/config.c       85) die(_(\"only one config file at a \ntime\"));\na12c1ff3a5 builtin/config.c       88) die(_(\"--local can only be used \ninside a git repository\"));\na12c1ff3a5 builtin/config.c       91) die(_(\"--blob can only be used \ninside a git repository\"));\na12c1ff3a5 builtin/config.c       95) given_config_source.file = NULL;\na12c1ff3a5 builtin/config.c       96) given_config_source.use_stdin = 1;\na12c1ff3a5 builtin/config.c      110) die(_(\"$HOME not set\"));\na12c1ff3a5 builtin/config.c      114) given_config_source.file = xdg_config;\na12c1ff3a5 builtin/config.c      115) free(user_config);\na12c1ff3a5 builtin/config.c      122) given_config_source.file = \ngit_etc_gitconfig();\na12c1ff3a5 builtin/config.c      126) given_config_source.file = \nget_worktree_config(the_repository);\na12c1ff3a5 builtin/config.c      127) if (!given_config_source.file)\na12c1ff3a5 builtin/config.c      128) die(_(\"--worktree cannot be used \nwith multiple \"\n6f11fd5edb builtin/config.c      185) static int option_move_cb(const \nstruct option *opt,\n6f11fd5edb builtin/config.c      188) BUG_ON_OPT_NEG(unset);\n6f11fd5edb builtin/config.c      189) BUG_ON_OPT_ARG(arg);\n6f11fd5edb builtin/config.c      191) set_config_source_file();\n6f11fd5edb builtin/config.c      192) memcpy(&move_source, \n&given_config_source, sizeof(move_source));\n6f11fd5edb builtin/config.c      194) memset(&given_config_source, 0, \nsizeof(given_config_source));\n6f11fd5edb builtin/config.c      195) use_global_config = 0;\n6f11fd5edb builtin/config.c      196) use_system_config = 0;\n6f11fd5edb builtin/config.c      197) use_local_config = 0;\n6f11fd5edb builtin/config.c      198) use_worktree_config = 0;\n6f11fd5edb builtin/config.c      200) actions = opt->defval;\n6f11fd5edb builtin/config.c      201) return 0;\n6f11fd5edb builtin/config.c      471) static int \ncollect_move_config(const char *key, const char *value, void *cb)\n6f11fd5edb builtin/config.c      473) struct move_config_cb *data = cb;\n6f11fd5edb builtin/config.c      475) switch (actions) {\n6f11fd5edb builtin/config.c      477) if (strcasecmp(data->key, key))\n6f11fd5edb builtin/config.c      478) return 0;\n6f11fd5edb builtin/config.c      479) break;\n6f11fd5edb builtin/config.c      481) if (regexec(&data->key_re, key, 0, \nNULL, 0))\n6f11fd5edb builtin/config.c      482) return 0;\n6f11fd5edb builtin/config.c      483) break;\n6f11fd5edb builtin/config.c      485) if (wildmatch(data->key, key, \nWM_CASEFOLD))\n6f11fd5edb builtin/config.c      486) return 0;\n6f11fd5edb builtin/config.c      487) break;\n6f11fd5edb builtin/config.c      492) string_list_append(&data->keys, \nkey)->util = xstrdup(value);\n6f11fd5edb builtin/config.c      493) return 0;\n6f11fd5edb builtin/config.c      496) static int move_config(const char \n*key)\n6f11fd5edb builtin/config.c      499) int i, ret = 0;\n6f11fd5edb builtin/config.c      501) config_options.respect_includes = 0;\n6f11fd5edb builtin/config.c      502) if (!move_source.file && \n!move_source.use_stdin && !move_source.blob)\n6f11fd5edb builtin/config.c      503) die(_(\"unknown config source\"));\n6f11fd5edb builtin/config.c      505) string_list_init(&cb.keys, 1);\n6f11fd5edb builtin/config.c      506) cb.key = key;\n6f11fd5edb builtin/config.c      507) if (actions == ACTION_MOVE_REGEXP &&\n6f11fd5edb builtin/config.c      508) regcomp(&cb.key_re, key, \nREG_EXTENDED | REG_ICASE))\n6f11fd5edb builtin/config.c      509) die(_(\"invalid key pattern: %s\"), \nkey);\n6f11fd5edb builtin/config.c      511) \nconfig_with_options(collect_move_config, &cb,\n6f11fd5edb builtin/config.c      514) for (i = 0; i < cb.keys.nr && \n!ret; i++) {\n6f11fd5edb builtin/config.c      515) const char *key = \ncb.keys.items[i].string;\n6f11fd5edb builtin/config.c      516) const char *value = \ncb.keys.items[i].util;\n6f11fd5edb builtin/config.c      517) const char *dest = \ngiven_config_source.file;\n6f11fd5edb builtin/config.c      519) ret = \ngit_config_set_multivar_in_file_gently(\n6f11fd5edb builtin/config.c      527) if (!ret && move_source.file) {\n6f11fd5edb builtin/config.c      528) for (i = 0; i < cb.keys.nr; i++) {\n6f11fd5edb builtin/config.c      529) const char *key = \ncb.keys.items[i].string;\n6f11fd5edb builtin/config.c      530) const char *src = move_source.file;\n6f11fd5edb builtin/config.c      532) \ngit_config_set_multivar_in_file_gently(\n6f11fd5edb builtin/config.c      537) string_list_clear(&cb.keys, 1);\n6f11fd5edb builtin/config.c      538) if (actions == ACTION_MOVE_REGEXP)\n6f11fd5edb builtin/config.c      539) regfree(&cb.key_re);\n6f11fd5edb builtin/config.c      540) return ret;\n6f11fd5edb builtin/config.c      979) else if (actions == ACTION_MOVE ||\n6f11fd5edb builtin/config.c      980)  actions == ACTION_MOVE_REGEXP ||\n6f11fd5edb builtin/config.c      981)  actions == ACTION_MOVE_GLOB) {\n6f11fd5edb builtin/config.c      982) check_write();\n6f11fd5edb builtin/config.c      983) check_argc(argc, 1, 1);\n6f11fd5edb builtin/config.c      984) return move_config(argv[0]);\n\nbuiltin/describe.c\n1b0d968b34 builtin/describe.c 638) \nrepo_update_index_if_able(the_repository, &index_lock);\n\nbuiltin/diff-tree.c\ne1ff0a32e4 builtin/diff-tree.c 169) repo_read_index(the_repository);\n\nbuiltin/grep.c\ndba093ddc0 builtin/grep.c  403) static int grep_submodule(struct \ngrep_opt *opt,\ndba093ddc0 builtin/grep.c  409) struct repository *superproject = opt->repo;\ndba093ddc0 builtin/grep.c  448) memcpy(&subopt, opt, sizeof(subopt));\nb6b4172bfb builtin/grep.c  449) subopt.repo = &subrepo;\ndba093ddc0 builtin/grep.c  472) hit = grep_tree(&subopt, pathspec, \n&tree, &base, base.len,\ndba093ddc0 builtin/grep.c  473) object->type == OBJ_COMMIT);\ndba093ddc0 builtin/grep.c  477) hit = grep_cache(&subopt, pathspec, 1);\ndba093ddc0 builtin/grep.c  484) static int grep_cache(struct grep_opt *opt,\ndba093ddc0 builtin/grep.c  487) struct repository *repo = opt->repo;\ndba093ddc0 builtin/grep.c  525) hit |= grep_submodule(opt, pathspec, \nNULL, ce->name, ce->name);\ndba093ddc0 builtin/grep.c  549) struct repository *repo = opt->repo;\nb6b4172bfb builtin/grep.c  599) hit |= grep_submodule(opt, pathspec, \n&entry.oid,\ndba093ddc0 builtin/grep.c  641) obj->type == OBJ_COMMIT);\ndba093ddc0 builtin/grep.c  658) real_obj = deref_tag(opt->repo, \nlist->objects[i].item,\ndba093ddc0 builtin/grep.c  663) submodule_free(opt->repo);\ndba093ddc0 builtin/grep.c  688) fill_directory(&dir, opt->repo->index, \npathspec);\ndba093ddc0 builtin/grep.c  690) if (!dir_path_match(opt->repo->index, \ndir.entries[i], pathspec, 0, NULL))\n3a7a698e93 builtin/grep.c 1028) if (get_oid_with_context(the_repository, \narg,\ndba093ddc0 builtin/grep.c 1132) hit = grep_cache(&opt, &pathspec, cached);\n\nbuiltin/log.c\n3a7a698e93 builtin/log.c  513) if (get_oid_with_context(the_repository, \nobj_name,\n\nbuiltin/merge-tree.c\n4478671442 builtin/merge-tree.c  80) return \nmerge_blobs(the_repository->index, path,\n\nbuiltin/merge.c\n08339886b9 builtin/merge.c  120) static enum parse_opt_result \noption_read_message(struct parse_opt_ctx_t *ctx,\n9b4ae5190a builtin/merge.c  128) BUG_ON_OPT_ARG(arg_not_used);\n\nbuiltin/notes.c\n1d18d7581c builtin/notes.c  333) commit_notes(the_repository, t, msg);\n1d18d7581c builtin/notes.c  336) \nfinish_copy_notes_for_rewrite(the_repository, c, msg);\n1d18d7581c builtin/notes.c  472) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  478) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  557) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  642) commit_notes(the_repository, t, logmsg);\n1d18d7581c builtin/notes.c  943) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  972) commit_notes(the_repository, t,\n\nbuiltin/pack-objects.c\n3d036eb0d2 builtin/pack-objects.c 2716) sparse = git_config_bool(k, v);\n3d036eb0d2 builtin/pack-objects.c 2717) return 0;\n\nbuiltin/pack-redundant.c\na338d10395 builtin/pack-redundant.c 339) static int \ncmp_remaining_objects(const void *a, const void *b)\ne4e2c2884e builtin/pack-redundant.c 341) struct pack_list *pl_a = \n*((struct pack_list **)a);\ne4e2c2884e builtin/pack-redundant.c 342) struct pack_list *pl_b = \n*((struct pack_list **)b);\na338d10395 builtin/pack-redundant.c 344) if \n(pl_a->remaining_objects->size == pl_b->remaining_objects->size) {\na338d10395 builtin/pack-redundant.c 346) if (pl_a->all_objects_size == \npl_b->all_objects_size)\na338d10395 builtin/pack-redundant.c 347) return 0;\na338d10395 builtin/pack-redundant.c 348) else if (pl_a->all_objects_size \n< pl_b->all_objects_size)\na338d10395 builtin/pack-redundant.c 349) return 1;\na338d10395 builtin/pack-redundant.c 351) return -1;\na338d10395 builtin/pack-redundant.c 352) } else if \n(pl_a->remaining_objects->size < pl_b->remaining_objects->size) {\ne4e2c2884e builtin/pack-redundant.c 354) return 1;\ne4e2c2884e builtin/pack-redundant.c 356) return -1;\ne4e2c2884e builtin/pack-redundant.c 361) static void \nsort_pack_list(struct pack_list **pl)\ne4e2c2884e builtin/pack-redundant.c 365) size_t n = pack_list_size(*pl);\ne4e2c2884e builtin/pack-redundant.c 367) if (n < 2)\ne4e2c2884e builtin/pack-redundant.c 368) return;\ne4e2c2884e builtin/pack-redundant.c 371) ary = xcalloc(n, sizeof(struct \npack_list *));\ne4e2c2884e builtin/pack-redundant.c 372) for (n = 0, p = *pl; p; p = \np->next)\ne4e2c2884e builtin/pack-redundant.c 373) ary[n++] = p;\na338d10395 builtin/pack-redundant.c 375) QSORT(ary, n, \ncmp_remaining_objects);\ne4e2c2884e builtin/pack-redundant.c 378) for (i = 0; i < n - 1; i++)\ne4e2c2884e builtin/pack-redundant.c 379) ary[i]->next = ary[i + 1];\ne4e2c2884e builtin/pack-redundant.c 380) ary[n - 1]->next = NULL;\ne4e2c2884e builtin/pack-redundant.c 381) *pl = ary[0];\ne4e2c2884e builtin/pack-redundant.c 383) free(ary);\ne4e2c2884e builtin/pack-redundant.c 389) struct pack_list *pl, *unique = \nNULL, *non_unique = NULL;\ncb7e0336fc builtin/pack-redundant.c 404) \nllist_sorted_difference_inplace(missing, pl->remaining_objects);\ne4e2c2884e builtin/pack-redundant.c 408) *min = unique;\ne4e2c2884e builtin/pack-redundant.c 416) unique_pack_objects = \nllist_copy(all_objects);\ne4e2c2884e builtin/pack-redundant.c 417) \nllist_sorted_difference_inplace(unique_pack_objects, missing);\ne4e2c2884e builtin/pack-redundant.c 420) pl = non_unique;\ncb7e0336fc builtin/pack-redundant.c 422) \nllist_sorted_difference_inplace(pl->remaining_objects, unique_pack_objects);\ne4e2c2884e builtin/pack-redundant.c 426) while (non_unique) {\ne4e2c2884e builtin/pack-redundant.c 428) sort_pack_list(&non_unique);\ncb7e0336fc builtin/pack-redundant.c 429) if \n(non_unique->remaining_objects->size == 0)\ne4e2c2884e builtin/pack-redundant.c 430) break;\ne4e2c2884e builtin/pack-redundant.c 432) pack_list_insert(min, non_unique);\ncb7e0336fc builtin/pack-redundant.c 434) for (pl = non_unique->next; pl \n&& pl->remaining_objects->size > 0;  pl = pl->next)\ncb7e0336fc builtin/pack-redundant.c 435) \nllist_sorted_difference_inplace(pl->remaining_objects, \nnon_unique->remaining_objects);\ne4e2c2884e builtin/pack-redundant.c 437) non_unique = non_unique->next;\ncb7e0336fc builtin/pack-redundant.c 450) l = pl->remaining_objects->front;\ncb7e0336fc builtin/pack-redundant.c 461) \nllist_sorted_difference_inplace(all_objects, pl->remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 490) \nllist_sorted_difference_inplace(all_objects, alt->remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 505) llist_init(&l.remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 514) \nllist_insert_back(l.remaining_objects, (const struct object_id *)(base + \noff));\na338d10395 builtin/pack-redundant.c 517) l.all_objects_size = \nl.remaining_objects->size;\ncb7e0336fc builtin/pack-redundant.c 519) l.unique_objects = \nllist_copy(l.remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 615) \nllist_sorted_difference_inplace(pl->remaining_objects, ignore);\n\nbuiltin/range-diff.c\n26c50430dc 78) FREE_AND_NULL(options);\n\nbuiltin/rebase--interactive.c\ne5b1c9d929 builtin/rebase--interactive.c   17) static int \nedit_todo_file(unsigned flags)\ne5b1c9d929 builtin/rebase--interactive.c   19) const char *todo_file = \nrebase_path_todo();\ne5b1c9d929 builtin/rebase--interactive.c   20) struct todo_list \ntodo_list = TODO_LIST_INIT,\ne5b1c9d929 builtin/rebase--interactive.c   21) new_todo = TODO_LIST_INIT;\ne5b1c9d929 builtin/rebase--interactive.c   23) if \n(strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)\ne5b1c9d929 builtin/rebase--interactive.c   24) return \nerror_errno(_(\"could not read '%s'.\"), todo_file);\ne5b1c9d929 builtin/rebase--interactive.c   26) \nstrbuf_stripspace(&todo_list.buf, 1);\ne5b1c9d929 builtin/rebase--interactive.c   27) if \n(!edit_todo_list(the_repository, &todo_list,\ne5b1c9d929 builtin/rebase--interactive.c   28) &new_todo, NULL, NULL, \nflags) &&\ne5b1c9d929 builtin/rebase--interactive.c   29) \ntodo_list_write_to_file(the_repository, &new_todo, todo_file, NULL, NULL,\ne5b1c9d929 builtin/rebase--interactive.c   31) return \nerror_errno(_(\"could not write '%s'\"), todo_file);\ne5b1c9d929 builtin/rebase--interactive.c   33) \ntodo_list_release(&todo_list);\ne5b1c9d929 builtin/rebase--interactive.c   34) todo_list_release(&new_todo);\ne5b1c9d929 builtin/rebase--interactive.c   36) return 0;\n4d55dfd767 builtin/rebase--interactive.c   39) static int \ntransform_todo_file(unsigned flags)\n4d55dfd767 builtin/rebase--interactive.c   41) const char *todo_file = \nrebase_path_todo();\n4d55dfd767 builtin/rebase--interactive.c   42) struct todo_list \ntodo_list = TODO_LIST_INIT;\n4d55dfd767 builtin/rebase--interactive.c   45) if \n(strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)\n4d55dfd767 builtin/rebase--interactive.c   46) return \nerror_errno(_(\"could not read '%s'.\"), todo_file);\n4d55dfd767 builtin/rebase--interactive.c   48) if \n(todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf,\n4d55dfd767 builtin/rebase--interactive.c   50) \ntodo_list_release(&todo_list);\n4d55dfd767 builtin/rebase--interactive.c   51) return error(_(\"unusable \ntodo list: '%s'\"), todo_file);\n4d55dfd767 builtin/rebase--interactive.c   54) res = \ntodo_list_write_to_file(the_repository, &todo_list, todo_file,\n4d55dfd767 builtin/rebase--interactive.c   56) \ntodo_list_release(&todo_list);\n4d55dfd767 builtin/rebase--interactive.c   58) if (res)\n4d55dfd767 builtin/rebase--interactive.c   59) return \nerror_errno(_(\"could not write '%s'.\"), todo_file);\n4d55dfd767 builtin/rebase--interactive.c   60) return 0;\n0566a4f68e builtin/rebase--interactive.c  121) struct todo_list \ntodo_list = TODO_LIST_INIT;\n0566a4f68e builtin/rebase--interactive.c  147) ret = \nsequencer_make_script(the_repository, &todo_list.buf,\nc1c074e0cc builtin/rebase--interactive.c  155) if \n(todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf,\nc1c074e0cc builtin/rebase--interactive.c  159) ret = \ncomplete_action(the_repository, opts, flags, shortrevisions, onto_name,\n0566a4f68e builtin/rebase--interactive.c  165) \ntodo_list_release(&todo_list);\n8414c890aa builtin/rebase--interactive.c  269) if (cmd && *cmd) {\n8414c890aa builtin/rebase--interactive.c  270) \nstring_list_split(&commands, cmd, '\\n', -1);\n8414c890aa builtin/rebase--interactive.c  271) if \n(strlen(commands.items[commands.nr - 1].string) == 0)\n8414c890aa builtin/rebase--interactive.c  272) --commands.nr;\ne5b1c9d929 builtin/rebase--interactive.c  294) ret = edit_todo_file(flags);\n4d55dfd767 builtin/rebase--interactive.c  307) ret = \ntransform_todo_file(flags);\nc27b32f0ec builtin/rebase--interactive.c  310) ret = \ncheck_todo_list_from_file(the_repository);\nfebebd99b6 builtin/rebase--interactive.c  313) ret = \nrearrange_squash_in_todo_file(the_repository);\n8414c890aa builtin/rebase--interactive.c  316) ret = \nsequencer_add_exec_commands(the_repository, &commands);\n\nbuiltin/rebase.c\nb6b4172bfb  423) if (repo_read_index_unmerged(the_repository) < 0) {\ne1ff0a32e4 1236) if (repo_read_index(the_repository) < 0)\n1b0d968b34 1241) repo_update_index_if_able(the_repository, &lock_file);\ne1ff0a32e4 1593) if (repo_read_index(the_repository) < 0)\n1b0d968b34 1603) repo_update_index_if_able(the_repository, &lock_file);\ne1ff0a32e4 1648) repo_read_index(the_repository) < 0)\n\nbuiltin/replace.c\n4478671442 builtin/replace.c 298) if (index_fd(the_repository->index, \noid, fd, &st, type, NULL, flags) < 0)\n\nbuiltin/stash.c\nf6bbd78127 builtin/stash--helper.c  117) static void \nfree_stash_info(struct stash_info *info)\nf6bbd78127 builtin/stash--helper.c  119) strbuf_release(&info->revision);\nf6bbd78127 builtin/stash--helper.c  120) }\nf6bbd78127 builtin/stash--helper.c  122) static void \nassert_stash_like(struct stash_info *info, const char *revision)\nf6bbd78127 builtin/stash--helper.c  124) if (get_oidf(&info->b_commit, \n\"%s^1\", revision) ||\nf6bbd78127 builtin/stash--helper.c  125) get_oidf(&info->w_tree, \"%s:\", \nrevision) ||\nf6bbd78127 builtin/stash--helper.c  126) get_oidf(&info->b_tree, \n\"%s^1:\", revision) ||\nf6bbd78127 builtin/stash--helper.c  127) get_oidf(&info->i_tree, \n\"%s^2:\", revision))\nf6bbd78127 builtin/stash--helper.c  128) die(_(\"'%s' is not a stash-like \ncommit\"), revision);\nf6bbd78127 builtin/stash--helper.c  129) }\nf6bbd78127 builtin/stash--helper.c  131) static int \nget_stash_info(struct stash_info *info, int argc, const char **argv)\nf6bbd78127 builtin/stash--helper.c  137) const char *commit = NULL;\nf6bbd78127 builtin/stash--helper.c  139) struct strbuf symbolic = \nSTRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  141) if (argc > 1) {\nf6bbd78127 builtin/stash--helper.c  143) struct strbuf refs_msg = \nSTRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  145) for (i = 0; i < argc; i++)\nf6bbd78127 builtin/stash--helper.c  146) strbuf_addf(&refs_msg, \" '%s'\", \nargv[i]);\nf6bbd78127 builtin/stash--helper.c  148) fprintf_ln(stderr, _(\"Too many \nrevisions specified:%s\"),\nf6bbd78127 builtin/stash--helper.c  150) strbuf_release(&refs_msg);\nf6bbd78127 builtin/stash--helper.c  152) return -1;\nf6bbd78127 builtin/stash--helper.c  155) if (argc == 1)\nf6bbd78127 builtin/stash--helper.c  156) commit = argv[0];\nf6bbd78127 builtin/stash--helper.c  158) strbuf_init(&info->revision, 0);\nf6bbd78127 builtin/stash--helper.c  159) if (!commit) {\nf6bbd78127 builtin/stash--helper.c  160) if (!ref_exists(ref_stash)) {\nf6bbd78127 builtin/stash--helper.c  161) free_stash_info(info);\nf6bbd78127 builtin/stash--helper.c  162) fprintf_ln(stderr, _(\"No stash \nentries found.\"));\nf6bbd78127 builtin/stash--helper.c  163) return -1;\nf6bbd78127 builtin/stash--helper.c  166) strbuf_addf(&info->revision, \n\"%s@{0}\", ref_stash);\nf6bbd78127 builtin/stash--helper.c  167) } else if (strspn(commit, \n\"0123456789\") == strlen(commit)) {\nf6bbd78127 builtin/stash--helper.c  168) strbuf_addf(&info->revision, \n\"%s@{%s}\", ref_stash, commit);\nf6bbd78127 builtin/stash--helper.c  170) strbuf_addstr(&info->revision, \ncommit);\nf6bbd78127 builtin/stash--helper.c  173) revision = info->revision.buf;\nf6bbd78127 builtin/stash--helper.c  175) if (get_oid(revision, \n&info->w_commit)) {\nf6bbd78127 builtin/stash--helper.c  176) error(_(\"%s is not a valid \nreference\"), revision);\nf6bbd78127 builtin/stash--helper.c  177) free_stash_info(info);\nf6bbd78127 builtin/stash--helper.c  178) return -1;\nf6bbd78127 builtin/stash--helper.c  181) assert_stash_like(info, revision);\nf6bbd78127 builtin/stash--helper.c  183) info->has_u = \n!get_oidf(&info->u_tree, \"%s^3:\", revision);\nf6bbd78127 builtin/stash--helper.c  185) end_of_rev = \nstrchrnul(revision, '@');\nf6bbd78127 builtin/stash--helper.c  186) strbuf_add(&symbolic, revision, \nend_of_rev - revision);\nf6bbd78127 builtin/stash--helper.c  188) ret = dwim_ref(symbolic.buf, \nsymbolic.len, &dummy, &expanded_ref);\nf6bbd78127 builtin/stash--helper.c  189) strbuf_release(&symbolic);\nf6bbd78127 builtin/stash--helper.c  190) switch (ret) {\nf6bbd78127 builtin/stash--helper.c  192) info->is_stash_ref = 0;\nf6bbd78127 builtin/stash--helper.c  193) break;\nf6bbd78127 builtin/stash--helper.c  195) info->is_stash_ref = \n!strcmp(expanded_ref, ref_stash);\nf6bbd78127 builtin/stash--helper.c  196) break;\nf6bbd78127 builtin/stash--helper.c  198) free_stash_info(info);\nf6bbd78127 builtin/stash--helper.c  201) free(expanded_ref);\nf6bbd78127 builtin/stash--helper.c  202) return !(ret == 0 || ret == 1);\ncdca49bc4c builtin/stash--helper.c  205) static int do_clear_stash(void)\ncdca49bc4c builtin/stash--helper.c  208) if (get_oid(ref_stash, &obj))\ncdca49bc4c builtin/stash--helper.c  209) return 0;\ncdca49bc4c builtin/stash--helper.c  211) return delete_ref(NULL, \nref_stash, &obj, 0);\ncdca49bc4c builtin/stash--helper.c  214) static int clear_stash(int \nargc, const char **argv, const char *prefix)\ncdca49bc4c builtin/stash--helper.c  216) struct option options[] = {\ncdca49bc4c builtin/stash--helper.c  220) argc = parse_options(argc, \nargv, prefix, options,\ncdca49bc4c builtin/stash--helper.c  224) if (argc)\ncdca49bc4c builtin/stash--helper.c  225) return error(_(\"git stash clear \nwith parameters is \"\ncdca49bc4c builtin/stash--helper.c  228) return do_clear_stash();\nf6bbd78127 builtin/stash--helper.c  231) static int reset_tree(struct \nobject_id *i_tree, int update, int reset)\nf6bbd78127 builtin/stash--helper.c  233) int nr_trees = 1;\nf6bbd78127 builtin/stash--helper.c  237) struct lock_file lock_file = \nLOCK_INIT;\nf6bbd78127 builtin/stash--helper.c  239) read_cache_preload(NULL);\nf6bbd78127 builtin/stash--helper.c  240) if (refresh_cache(REFRESH_QUIET))\nf6bbd78127 builtin/stash--helper.c  241) return -1;\nf6bbd78127 builtin/stash--helper.c  243) hold_locked_index(&lock_file, \nLOCK_DIE_ON_ERROR);\nf6bbd78127 builtin/stash--helper.c  245) memset(&opts, 0, sizeof(opts));\nf6bbd78127 builtin/stash--helper.c  247) tree = parse_tree_indirect(i_tree);\nf6bbd78127 builtin/stash--helper.c  248) if (parse_tree(tree))\nf6bbd78127 builtin/stash--helper.c  249) return -1;\nf6bbd78127 builtin/stash--helper.c  251) init_tree_desc(t, tree->buffer, \ntree->size);\nf6bbd78127 builtin/stash--helper.c  253) opts.head_idx = 1;\nf6bbd78127 builtin/stash--helper.c  254) opts.src_index = &the_index;\nf6bbd78127 builtin/stash--helper.c  255) opts.dst_index = &the_index;\nf6bbd78127 builtin/stash--helper.c  256) opts.merge = 1;\nf6bbd78127 builtin/stash--helper.c  257) opts.reset = reset;\nf6bbd78127 builtin/stash--helper.c  258) opts.update = update;\nf6bbd78127 builtin/stash--helper.c  259) opts.fn = oneway_merge;\nf6bbd78127 builtin/stash--helper.c  261) if (unpack_trees(nr_trees, t, \n&opts))\nf6bbd78127 builtin/stash--helper.c  262) return -1;\nf6bbd78127 builtin/stash--helper.c  264) if \n(write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\nf6bbd78127 builtin/stash--helper.c  265) return error(_(\"unable to write \nnew index file\"));\nf6bbd78127 builtin/stash--helper.c  267) return 0;\nf6bbd78127 builtin/stash--helper.c  270) static int \ndiff_tree_binary(struct strbuf *out, struct object_id *w_commit)\nf6bbd78127 builtin/stash--helper.c  272) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  273) const char *w_commit_hex = \noid_to_hex(w_commit);\nf6bbd78127 builtin/stash--helper.c  279) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  280) argv_array_pushl(&cp.args, \n\"diff-tree\", \"--binary\", NULL);\nf6bbd78127 builtin/stash--helper.c  281) argv_array_pushf(&cp.args, \n\"%s^2^..%s^2\", w_commit_hex, w_commit_hex);\nf6bbd78127 builtin/stash--helper.c  283) return pipe_command(&cp, NULL, \n0, out, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  286) static int apply_cached(struct \nstrbuf *out)\nf6bbd78127 builtin/stash--helper.c  288) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  295) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  296) argv_array_pushl(&cp.args, \n\"apply\", \"--cached\", NULL);\nf6bbd78127 builtin/stash--helper.c  297) return pipe_command(&cp, \nout->buf, out->len, NULL, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  300) static int reset_head(void)\nf6bbd78127 builtin/stash--helper.c  302) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  308) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  309) argv_array_push(&cp.args, \"reset\");\nf6bbd78127 builtin/stash--helper.c  311) return run_command(&cp);\n1f5a011d90 builtin/stash--helper.c  314) static void \nadd_diff_to_buf(struct diff_queue_struct *q,\n1f5a011d90 builtin/stash--helper.c  320) for (i = 0; i < q->nr; i++) {\n1f5a011d90 builtin/stash--helper.c  321) strbuf_addstr(data, \nq->queue[i]->one->path);\n1f5a011d90 builtin/stash--helper.c  328) strbuf_addch(data, '\\0');\n1f5a011d90 builtin/stash--helper.c  330) }\nf6bbd78127 builtin/stash--helper.c  332) static int \nget_newly_staged(struct strbuf *out, struct object_id *c_tree)\nf6bbd78127 builtin/stash--helper.c  334) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  335) const char *c_tree_hex = \noid_to_hex(c_tree);\nf6bbd78127 builtin/stash--helper.c  341) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  342) argv_array_pushl(&cp.args, \n\"diff-index\", \"--cached\", \"--name-only\",\nf6bbd78127 builtin/stash--helper.c  344) argv_array_push(&cp.args, \nc_tree_hex);\nf6bbd78127 builtin/stash--helper.c  345) return pipe_command(&cp, NULL, \n0, out, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  348) static int update_index(struct \nstrbuf *out)\nf6bbd78127 builtin/stash--helper.c  350) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  356) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  357) argv_array_pushl(&cp.args, \n\"update-index\", \"--add\", \"--stdin\", NULL);\nf6bbd78127 builtin/stash--helper.c  358) return pipe_command(&cp, \nout->buf, out->len, NULL, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  361) static int \nrestore_untracked(struct object_id *u_tree)\nf6bbd78127 builtin/stash--helper.c  364) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  371) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  372) argv_array_push(&cp.args, \n\"read-tree\");\nf6bbd78127 builtin/stash--helper.c  373) argv_array_push(&cp.args, \noid_to_hex(u_tree));\nf6bbd78127 builtin/stash--helper.c  374) argv_array_pushf(&cp.env_array, \n\"GIT_INDEX_FILE=%s\",\nf6bbd78127 builtin/stash--helper.c  376) if (run_command(&cp)) {\nf6bbd78127 builtin/stash--helper.c  377) remove_path(stash_index_path.buf);\nf6bbd78127 builtin/stash--helper.c  378) return -1;\nf6bbd78127 builtin/stash--helper.c  381) child_process_init(&cp);\nf6bbd78127 builtin/stash--helper.c  382) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  383) argv_array_pushl(&cp.args, \n\"checkout-index\", \"--all\", NULL);\nf6bbd78127 builtin/stash--helper.c  384) argv_array_pushf(&cp.env_array, \n\"GIT_INDEX_FILE=%s\",\nf6bbd78127 builtin/stash--helper.c  387) res = run_command(&cp);\nf6bbd78127 builtin/stash--helper.c  388) remove_path(stash_index_path.buf);\nf6bbd78127 builtin/stash--helper.c  389) return res;\nf6bbd78127 builtin/stash--helper.c  392) static int do_apply_stash(const \nchar *prefix, struct stash_info *info,\nf6bbd78127 builtin/stash--helper.c  396) int has_index = index;\nf6bbd78127 builtin/stash--helper.c  403) read_cache_preload(NULL);\nf6bbd78127 builtin/stash--helper.c  404) if (refresh_cache(REFRESH_QUIET))\nf6bbd78127 builtin/stash--helper.c  405) return -1;\nf6bbd78127 builtin/stash--helper.c  407) if \n(write_cache_as_tree(&c_tree, 0, NULL) || reset_tree(&c_tree, 0, 0))\nf6bbd78127 builtin/stash--helper.c  408) return error(_(\"cannot apply a \nstash in the middle of a merge\"));\nf6bbd78127 builtin/stash--helper.c  410) if (index) {\nf6bbd78127 builtin/stash--helper.c  411) if (oideq(&info->b_tree, \n&info->i_tree) ||\nf6bbd78127 builtin/stash--helper.c  412)     oideq(&c_tree, \n&info->i_tree)) {\nf6bbd78127 builtin/stash--helper.c  413) has_index = 0;\nf6bbd78127 builtin/stash--helper.c  415) struct strbuf out = STRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  417) if (diff_tree_binary(&out, \n&info->w_commit)) {\nf6bbd78127 builtin/stash--helper.c  418) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  419) return error(_(\"could not \ngenerate diff %s^!.\"),\nf6bbd78127 builtin/stash--helper.c  423) ret = apply_cached(&out);\nf6bbd78127 builtin/stash--helper.c  424) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  425) if (ret)\nf6bbd78127 builtin/stash--helper.c  426) return error(_(\"conflicts in \nindex.\"\nf6bbd78127 builtin/stash--helper.c  429) discard_cache();\nf6bbd78127 builtin/stash--helper.c  430) read_cache();\nf6bbd78127 builtin/stash--helper.c  431) if \n(write_cache_as_tree(&index_tree, 0, NULL))\nf6bbd78127 builtin/stash--helper.c  432) return error(_(\"could not save \nindex tree\"));\nf6bbd78127 builtin/stash--helper.c  434) reset_head();\nf6bbd78127 builtin/stash--helper.c  438) if (info->has_u && \nrestore_untracked(&info->u_tree))\nf6bbd78127 builtin/stash--helper.c  439) return error(_(\"could not \nrestore untracked files from stash\"));\nb6b4172bfb builtin/stash.c          441) init_merge_options(&o, \nthe_repository);\nf6bbd78127 builtin/stash--helper.c  443) o.branch1 = \"Updated upstream\";\nf6bbd78127 builtin/stash--helper.c  444) o.branch2 = \"Stashed changes\";\nf6bbd78127 builtin/stash--helper.c  446) if (oideq(&info->b_tree, &c_tree))\nf6bbd78127 builtin/stash--helper.c  447) o.branch1 = \"Version stash was \nbased on\";\nf6bbd78127 builtin/stash--helper.c  449) if (quiet)\nf6bbd78127 builtin/stash--helper.c  450) o.verbosity = 0;\nf6bbd78127 builtin/stash--helper.c  452) if (o.verbosity >= 3)\nf6bbd78127 builtin/stash--helper.c  453) printf_ln(_(\"Merging %s with \n%s\"), o.branch1, o.branch2);\nf6bbd78127 builtin/stash--helper.c  455) bases[0] = &info->b_tree;\nf6bbd78127 builtin/stash--helper.c  457) ret = \nmerge_recursive_generic(&o, &c_tree, &info->w_tree, 1, bases,\nf6bbd78127 builtin/stash--helper.c  459) if (ret) {\nf6bbd78127 builtin/stash--helper.c  460) rerere(0);\nf6bbd78127 builtin/stash--helper.c  462) if (index)\nf6bbd78127 builtin/stash--helper.c  463) fprintf_ln(stderr, _(\"Index was \nnot unstashed.\"));\nf6bbd78127 builtin/stash--helper.c  465) return ret;\nf6bbd78127 builtin/stash--helper.c  468) if (has_index) {\nf6bbd78127 builtin/stash--helper.c  469) if (reset_tree(&index_tree, 0, 0))\nf6bbd78127 builtin/stash--helper.c  470) return -1;\nf6bbd78127 builtin/stash--helper.c  472) struct strbuf out = STRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  474) if (get_newly_staged(&out, \n&c_tree)) {\nf6bbd78127 builtin/stash--helper.c  475) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  476) return -1;\nf6bbd78127 builtin/stash--helper.c  479) if (reset_tree(&c_tree, 0, 1)) {\nf6bbd78127 builtin/stash--helper.c  480) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  481) return -1;\nf6bbd78127 builtin/stash--helper.c  484) ret = update_index(&out);\nf6bbd78127 builtin/stash--helper.c  485) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  486) if (ret)\nf6bbd78127 builtin/stash--helper.c  487) return -1;\nf6bbd78127 builtin/stash--helper.c  489) discard_cache();\nf6bbd78127 builtin/stash--helper.c  492) if (quiet) {\nf6bbd78127 builtin/stash--helper.c  493) if (refresh_cache(REFRESH_QUIET))\nf6bbd78127 builtin/stash--helper.c  494) warning(\"could not refresh index\");\nf6bbd78127 builtin/stash--helper.c  496) struct child_process cp = \nCHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  503) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  504) cp.dir = prefix;\nf6bbd78127 builtin/stash--helper.c  505) argv_array_push(&cp.args, \n\"status\");\nf6bbd78127 builtin/stash--helper.c  506) run_command(&cp);\nf6bbd78127 builtin/stash--helper.c  509) return 0;\nf6bbd78127 builtin/stash--helper.c  512) static int apply_stash(int \nargc, const char **argv, const char *prefix)\nf6bbd78127 builtin/stash--helper.c  515) int quiet = 0;\nf6bbd78127 builtin/stash--helper.c  516) int index = 0;\nf6bbd78127 builtin/stash--helper.c  518) struct option options[] = {\nf6bbd78127 builtin/stash--helper.c  525) argc = parse_options(argc, \nargv, prefix, options,\nf6bbd78127 builtin/stash--helper.c  528) if (get_stash_info(&info, argc, \nargv))\nf6bbd78127 builtin/stash--helper.c  529) return -1;\nf6bbd78127 builtin/stash--helper.c  531) ret = do_apply_stash(prefix, \n&info, index, quiet);\nf6bbd78127 builtin/stash--helper.c  532) free_stash_info(&info);\nf6bbd78127 builtin/stash--helper.c  533) return ret;\ncdca49bc4c builtin/stash--helper.c  536) static int do_drop_stash(const \nchar *prefix, struct stash_info *info, int quiet)\ncdca49bc4c builtin/stash--helper.c  539) struct child_process cp_reflog \n= CHILD_PROCESS_INIT;\ncdca49bc4c builtin/stash--helper.c  540) struct child_process cp = \nCHILD_PROCESS_INIT;\ncdca49bc4c builtin/stash--helper.c  547) cp_reflog.git_cmd = 1;\ncdca49bc4c builtin/stash--helper.c  548) \nargv_array_pushl(&cp_reflog.args, \"reflog\", \"delete\", \"--updateref\",\ncdca49bc4c builtin/stash--helper.c  550) \nargv_array_push(&cp_reflog.args, info->revision.buf);\ncdca49bc4c builtin/stash--helper.c  551) ret = run_command(&cp_reflog);\ncdca49bc4c builtin/stash--helper.c  552) if (!ret) {\ncdca49bc4c builtin/stash--helper.c  553) if (!quiet)\ncdca49bc4c builtin/stash--helper.c  554) printf_ln(_(\"Dropped %s (%s)\"), \ninfo->revision.buf,\ncdca49bc4c builtin/stash--helper.c  555) oid_to_hex(&info->w_commit));\ncdca49bc4c builtin/stash--helper.c  557) return error(_(\"%s: Could not \ndrop stash entry\"),\ncdca49bc4c builtin/stash--helper.c  565) cp.git_cmd = 1;\ncdca49bc4c builtin/stash--helper.c  567) cp.no_stdout = 1;\ncdca49bc4c builtin/stash--helper.c  568) argv_array_pushl(&cp.args, \n\"rev-parse\", \"--verify\", \"--quiet\", NULL);\ncdca49bc4c builtin/stash--helper.c  569) argv_array_pushf(&cp.args, \n\"%s@{0}\", ref_stash);\ncdca49bc4c builtin/stash--helper.c  570) ret = run_command(&cp);\ncdca49bc4c builtin/stash--helper.c  573) if (ret)\ncdca49bc4c builtin/stash--helper.c  574) do_clear_stash();\ncdca49bc4c builtin/stash--helper.c  576) return 0;\ncdca49bc4c builtin/stash--helper.c  579) static void \nassert_stash_ref(struct stash_info *info)\ncdca49bc4c builtin/stash--helper.c  581) if (!info->is_stash_ref) {\ncdca49bc4c builtin/stash--helper.c  582) free_stash_info(info);\ncdca49bc4c builtin/stash--helper.c  583) error(_(\"'%s' is not a stash \nreference\"), info->revision.buf);\ncdca49bc4c builtin/stash--helper.c  584) exit(128);\ncdca49bc4c builtin/stash--helper.c  586) }\ncdca49bc4c builtin/stash--helper.c  588) static int drop_stash(int argc, \nconst char **argv, const char *prefix)\ncdca49bc4c builtin/stash--helper.c  591) int quiet = 0;\ncdca49bc4c builtin/stash--helper.c  593) struct option options[] = {\ncdca49bc4c builtin/stash--helper.c  598) argc = parse_options(argc, \nargv, prefix, options,\ncdca49bc4c builtin/stash--helper.c  601) if (get_stash_info(&info, argc, \nargv))\ncdca49bc4c builtin/stash--helper.c  602) return -1;\ncdca49bc4c builtin/stash--helper.c  604) assert_stash_ref(&info);\ncdca49bc4c builtin/stash--helper.c  606) ret = do_drop_stash(prefix, \n&info, quiet);\ncdca49bc4c builtin/stash--helper.c  607) free_stash_info(&info);\ncdca49bc4c builtin/stash--helper.c  608) return ret;\ne1d01876a4 builtin/stash--helper.c  611) static int pop_stash(int argc, \nconst char **argv, const char *prefix)\ne1d01876a4 builtin/stash--helper.c  614) int index = 0;\ne1d01876a4 builtin/stash--helper.c  615) int quiet = 0;\ne1d01876a4 builtin/stash--helper.c  617) struct option options[] = {\ne1d01876a4 builtin/stash--helper.c  624) argc = parse_options(argc, \nargv, prefix, options,\ne1d01876a4 builtin/stash--helper.c  627) if (get_stash_info(&info, argc, \nargv))\ne1d01876a4 builtin/stash--helper.c  628) return -1;\ne1d01876a4 builtin/stash--helper.c  630) assert_stash_ref(&info);\ne1d01876a4 builtin/stash--helper.c  631) if ((ret = \ndo_apply_stash(prefix, &info, index, quiet)))\ne1d01876a4 builtin/stash--helper.c  632) printf_ln(_(\"The stash entry is \nkept in case \"\ne1d01876a4 builtin/stash--helper.c  635) ret = do_drop_stash(prefix, \n&info, quiet);\ne1d01876a4 builtin/stash--helper.c  637) free_stash_info(&info);\ne1d01876a4 builtin/stash--helper.c  638) return ret;\nf596f3366c builtin/stash--helper.c  641) static int branch_stash(int \nargc, const char **argv, const char *prefix)\nf596f3366c builtin/stash--helper.c  644) const char *branch = NULL;\nf596f3366c builtin/stash--helper.c  646) struct child_process cp = \nCHILD_PROCESS_INIT;\nf596f3366c builtin/stash--helper.c  647) struct option options[] = {\nf596f3366c builtin/stash--helper.c  651) argc = parse_options(argc, \nargv, prefix, options,\nf596f3366c builtin/stash--helper.c  654) if (!argc) {\nf596f3366c builtin/stash--helper.c  655) fprintf_ln(stderr, _(\"No branch \nname specified\"));\nf596f3366c builtin/stash--helper.c  656) return -1;\nf596f3366c builtin/stash--helper.c  659) branch = argv[0];\nf596f3366c builtin/stash--helper.c  661) if (get_stash_info(&info, argc \n- 1, argv + 1))\nf596f3366c builtin/stash--helper.c  662) return -1;\nf596f3366c builtin/stash--helper.c  664) cp.git_cmd = 1;\nf596f3366c builtin/stash--helper.c  665) argv_array_pushl(&cp.args, \n\"checkout\", \"-b\", NULL);\nf596f3366c builtin/stash--helper.c  666) argv_array_push(&cp.args, branch);\nf596f3366c builtin/stash--helper.c  667) argv_array_push(&cp.args, \noid_to_hex(&info.b_commit));\nf596f3366c builtin/stash--helper.c  668) ret = run_command(&cp);\nf596f3366c builtin/stash--helper.c  669) if (!ret)\nf596f3366c builtin/stash--helper.c  670) ret = do_apply_stash(prefix, \n&info, 1, 0);\nf596f3366c builtin/stash--helper.c  671) if (!ret && info.is_stash_ref)\nf596f3366c builtin/stash--helper.c  672) ret = do_drop_stash(prefix, \n&info, 0);\nf596f3366c builtin/stash--helper.c  674) free_stash_info(&info);\nf596f3366c builtin/stash--helper.c  676) return ret;\n9b77b07ba4 builtin/stash--helper.c  679) static int list_stash(int argc, \nconst char **argv, const char *prefix)\n9b77b07ba4 builtin/stash--helper.c  681) struct child_process cp = \nCHILD_PROCESS_INIT;\n9b77b07ba4 builtin/stash--helper.c  682) struct option options[] = {\n9b77b07ba4 builtin/stash--helper.c  686) argc = parse_options(argc, \nargv, prefix, options,\n9b77b07ba4 builtin/stash--helper.c  690) if (!ref_exists(ref_stash))\n9b77b07ba4 builtin/stash--helper.c  691) return 0;\n9b77b07ba4 builtin/stash--helper.c  693) cp.git_cmd = 1;\n9b77b07ba4 builtin/stash--helper.c  694) argv_array_pushl(&cp.args, \n\"log\", \"--format=%gd: %gs\", \"-g\",\n9b77b07ba4 builtin/stash--helper.c  696) argv_array_pushv(&cp.args, argv);\n9b77b07ba4 builtin/stash--helper.c  697) argv_array_push(&cp.args, \nref_stash);\n9b77b07ba4 builtin/stash--helper.c  698) argv_array_push(&cp.args, \"--\");\n9b77b07ba4 builtin/stash--helper.c  699) return run_command(&cp);\nb4493f269e builtin/stash--helper.c  705) static int \ngit_stash_config(const char *var, const char *value, void *cb)\nb4493f269e builtin/stash--helper.c  707) if (!strcmp(var, \n\"stash.showstat\")) {\nb4493f269e builtin/stash--helper.c  708) show_stat = \ngit_config_bool(var, value);\nb4493f269e builtin/stash--helper.c  709) return 0;\nb4493f269e builtin/stash--helper.c  711) if (!strcmp(var, \n\"stash.showpatch\")) {\nb4493f269e builtin/stash--helper.c  712) show_patch = \ngit_config_bool(var, value);\nb4493f269e builtin/stash--helper.c  713) return 0;\nb4493f269e builtin/stash--helper.c  715) return git_default_config(var, \nvalue, cb);\nb4493f269e builtin/stash--helper.c  718) static int show_stash(int argc, \nconst char **argv, const char *prefix)\nb4493f269e builtin/stash--helper.c  721) int opts = 0;\nb4493f269e builtin/stash--helper.c  722) int ret = 0;\nb4493f269e builtin/stash--helper.c  725) struct argv_array stash_args = \nARGV_ARRAY_INIT;\nb4493f269e builtin/stash--helper.c  726) struct option options[] = {\nb4493f269e builtin/stash--helper.c  730) init_diff_ui_defaults();\nb4493f269e builtin/stash--helper.c  731) git_config(git_diff_ui_config, \nNULL);\nb4493f269e builtin/stash--helper.c  732) init_revisions(&rev, prefix);\nb4493f269e builtin/stash--helper.c  734) for (i = 1; i < argc; i++) {\nb4493f269e builtin/stash--helper.c  735) if (argv[i][0] != '-')\nb4493f269e builtin/stash--helper.c  736) argv_array_push(&stash_args, \nargv[i]);\nb4493f269e builtin/stash--helper.c  738) opts++;\nb4493f269e builtin/stash--helper.c  741) ret = get_stash_info(&info, \nstash_args.argc, stash_args.argv);\nb4493f269e builtin/stash--helper.c  742) argv_array_clear(&stash_args);\nb4493f269e builtin/stash--helper.c  743) if (ret)\nb4493f269e builtin/stash--helper.c  744) return -1;\nb4493f269e builtin/stash--helper.c  750) if (!opts) {\nb4493f269e builtin/stash--helper.c  751) git_config(git_stash_config, NULL);\nb4493f269e builtin/stash--helper.c  752) if (show_stat)\nb4493f269e builtin/stash--helper.c  753) rev.diffopt.output_format = \nDIFF_FORMAT_DIFFSTAT;\nb4493f269e builtin/stash--helper.c  755) if (show_patch)\nb4493f269e builtin/stash--helper.c  756) rev.diffopt.output_format |= \nDIFF_FORMAT_PATCH;\nb4493f269e builtin/stash--helper.c  758) if (!show_stat && !show_patch) {\nb4493f269e builtin/stash--helper.c  759) free_stash_info(&info);\nb4493f269e builtin/stash--helper.c  760) return 0;\nb4493f269e builtin/stash--helper.c  764) argc = setup_revisions(argc, \nargv, &rev, NULL);\nb4493f269e builtin/stash--helper.c  765) if (argc > 1) {\nb4493f269e builtin/stash--helper.c  766) free_stash_info(&info);\n51809c70ca builtin/stash.c          767) \nusage_with_options(git_stash_show_usage, options);\nb4493f269e builtin/stash--helper.c  770) rev.diffopt.flags.recursive = 1;\nb4493f269e builtin/stash--helper.c  771) setup_diff_pager(&rev.diffopt);\nb4493f269e builtin/stash--helper.c  772) diff_tree_oid(&info.b_commit, \n&info.w_commit, \"\", &rev.diffopt);\nb4493f269e builtin/stash--helper.c  773) log_tree_diff_flush(&rev);\nb4493f269e builtin/stash--helper.c  775) free_stash_info(&info);\nb4493f269e builtin/stash--helper.c  776) return \ndiff_result_code(&rev.diffopt, 0);\n847eb0b0a8 builtin/stash--helper.c  779) static int do_store_stash(const \nstruct object_id *w_commit, const char *stash_msg,\n847eb0b0a8 builtin/stash--helper.c  782) if (!stash_msg)\n847eb0b0a8 builtin/stash--helper.c  783) stash_msg = \"Created via \\\"git \nstash store\\\".\";\n847eb0b0a8 builtin/stash--helper.c  785) if (update_ref(stash_msg, \nref_stash, w_commit, NULL,\n847eb0b0a8 builtin/stash--helper.c  789) if (!quiet) {\n847eb0b0a8 builtin/stash--helper.c  790) fprintf_ln(stderr, _(\"Cannot \nupdate %s with %s\"),\n847eb0b0a8 builtin/stash--helper.c  793) return -1;\n847eb0b0a8 builtin/stash--helper.c  796) return 0;\n847eb0b0a8 builtin/stash--helper.c  799) static int store_stash(int \nargc, const char **argv, const char *prefix)\n847eb0b0a8 builtin/stash--helper.c  801) int quiet = 0;\n847eb0b0a8 builtin/stash--helper.c  802) const char *stash_msg = NULL;\n847eb0b0a8 builtin/stash--helper.c  805) struct option options[] = {\n847eb0b0a8 builtin/stash--helper.c  812) argc = parse_options(argc, \nargv, prefix, options,\n847eb0b0a8 builtin/stash--helper.c  816) if (argc != 1) {\n847eb0b0a8 builtin/stash--helper.c  817) if (!quiet)\n847eb0b0a8 builtin/stash--helper.c  818) fprintf_ln(stderr, _(\"\\\"git \nstash store\\\" requires one \"\n847eb0b0a8 builtin/stash--helper.c  820) return -1;\nb6b4172bfb builtin/stash.c          823) if \n(get_oid_with_context(the_repository,\n847eb0b0a8 builtin/stash--helper.c  826) if (!quiet)\n847eb0b0a8 builtin/stash--helper.c  827) fprintf_ln(stderr, _(\"Cannot \nupdate %s with %s\"),\n847eb0b0a8 builtin/stash--helper.c  829) return -1;\n847eb0b0a8 builtin/stash--helper.c  832) return do_store_stash(&obj, \nstash_msg, quiet);\n1f5a011d90 builtin/stash--helper.c  835) static void \nadd_pathspecs(struct argv_array *args,\n1f5a011d90 builtin/stash--helper.c  839) for (i = 0; i < ps.nr; i++)\n1f5a011d90 builtin/stash--helper.c  840) argv_array_push(args, \nps.items[i].match);\n1f5a011d90 builtin/stash--helper.c  841) }\n1f5a011d90 builtin/stash--helper.c  850) static int \nget_untracked_files(struct pathspec ps, int include_untracked,\n1f5a011d90 builtin/stash--helper.c  855) int found = 0;\n1f5a011d90 builtin/stash--helper.c  859) memset(&dir, 0, sizeof(dir));\n1f5a011d90 builtin/stash--helper.c  860) if (include_untracked != \nINCLUDE_ALL_FILES)\n1f5a011d90 builtin/stash--helper.c  861) setup_standard_excludes(&dir);\n1f5a011d90 builtin/stash--helper.c  863) seen = xcalloc(ps.nr, 1);\n1f5a011d90 builtin/stash--helper.c  865) max_len = fill_directory(&dir, \nthe_repository->index, &ps);\n1f5a011d90 builtin/stash--helper.c  866) for (i = 0; i < dir.nr; i++) {\n1f5a011d90 builtin/stash--helper.c  867) struct dir_entry *ent = \ndir.entries[i];\n1f5a011d90 builtin/stash--helper.c  868) if (dir_path_match(&the_index, \nent, &ps, max_len, seen)) {\n1f5a011d90 builtin/stash--helper.c  869) found++;\n1f5a011d90 builtin/stash--helper.c  870) strbuf_addstr(untracked_files, \nent->name);\n1f5a011d90 builtin/stash--helper.c  872) strbuf_addch(untracked_files, 0);\n1f5a011d90 builtin/stash--helper.c  874) free(ent);\n1f5a011d90 builtin/stash--helper.c  877) free(seen);\n1f5a011d90 builtin/stash--helper.c  878) free(dir.entries);\n1f5a011d90 builtin/stash--helper.c  879) free(dir.ignored);\n1f5a011d90 builtin/stash--helper.c  880) clear_directory(&dir);\n1f5a011d90 builtin/stash--helper.c  881) return found;\n168e6cff5e builtin/stash--helper.c  892) static int \ncheck_changes_tracked_files(struct pathspec ps)\n1f5a011d90 builtin/stash--helper.c  899) if (get_oid(\"HEAD\", &dummy))\n1f5a011d90 builtin/stash--helper.c  900) return -1;\n1f5a011d90 builtin/stash--helper.c  902) if (read_cache() < 0)\n1f5a011d90 builtin/stash--helper.c  903) return -1;\n1f5a011d90 builtin/stash--helper.c  905) init_revisions(&rev, NULL);\n1f5a011d90 builtin/stash--helper.c  906) rev.prune_data = ps;\n1f5a011d90 builtin/stash--helper.c  908) rev.diffopt.flags.quick = 1;\n1f5a011d90 builtin/stash--helper.c  909) \nrev.diffopt.flags.ignore_submodules = 1;\n1f5a011d90 builtin/stash--helper.c  910) rev.abbrev = 0;\n1f5a011d90 builtin/stash--helper.c  912) add_head_to_pending(&rev);\n1f5a011d90 builtin/stash--helper.c  913) diff_setup_done(&rev.diffopt);\n1f5a011d90 builtin/stash--helper.c  915) result = run_diff_index(&rev, 1);\n1f5a011d90 builtin/stash--helper.c  916) if \n(diff_result_code(&rev.diffopt, result))\n1f5a011d90 builtin/stash--helper.c  917) return 1;\n1f5a011d90 builtin/stash--helper.c  919) object_array_clear(&rev.pending);\n1f5a011d90 builtin/stash--helper.c  920) result = run_diff_files(&rev, 0);\n1f5a011d90 builtin/stash--helper.c  921) if \n(diff_result_code(&rev.diffopt, result))\n1f5a011d90 builtin/stash--helper.c  922) return 1;\n168e6cff5e builtin/stash--helper.c  924) return 0;\n168e6cff5e builtin/stash--helper.c  932) static int check_changes(struct \npathspec ps, int include_untracked,\n168e6cff5e builtin/stash--helper.c  935) int ret = 0;\n168e6cff5e builtin/stash--helper.c  936) if \n(check_changes_tracked_files(ps))\n168e6cff5e builtin/stash--helper.c  937) ret = 1;\n1f5a011d90 builtin/stash--helper.c  939) if (include_untracked && \nget_untracked_files(ps, include_untracked,\n168e6cff5e builtin/stash--helper.c  941) ret = 1;\n168e6cff5e builtin/stash--helper.c  943) return ret;\n1f5a011d90 builtin/stash--helper.c  946) static int \nsave_untracked_files(struct stash_info *info, struct strbuf *msg,\n1f5a011d90 builtin/stash--helper.c  949) int ret = 0;\n1f5a011d90 builtin/stash--helper.c  950) struct strbuf untracked_msg = \nSTRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c  951) struct child_process \ncp_upd_index = CHILD_PROCESS_INIT;\n559edead8f builtin/stash--helper.c  952) struct index_state istate = { \nNULL };\n1f5a011d90 builtin/stash--helper.c  954) cp_upd_index.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c  955) \nargv_array_pushl(&cp_upd_index.args, \"update-index\", \"-z\", \"--add\",\n1f5a011d90 builtin/stash--helper.c  957) \nargv_array_pushf(&cp_upd_index.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c  960) strbuf_addf(&untracked_msg, \n\"untracked files on %s\\n\", msg->buf);\n1f5a011d90 builtin/stash--helper.c  961) if (pipe_command(&cp_upd_index, \nfiles.buf, files.len, NULL, 0,\n1f5a011d90 builtin/stash--helper.c  963) ret = -1;\n1f5a011d90 builtin/stash--helper.c  964) goto done;\n559edead8f builtin/stash--helper.c  967) if \n(write_index_as_tree(&info->u_tree, &istate, stash_index_path.buf, 0,\n1f5a011d90 builtin/stash--helper.c  969) ret = -1;\n1f5a011d90 builtin/stash--helper.c  970) goto done;\n1f5a011d90 builtin/stash--helper.c  973) if \n(commit_tree(untracked_msg.buf, untracked_msg.len,\n1f5a011d90 builtin/stash--helper.c  974) &info->u_tree, NULL, \n&info->u_commit, NULL, NULL)) {\n1f5a011d90 builtin/stash--helper.c  975) ret = -1;\n1f5a011d90 builtin/stash--helper.c  976) goto done;\n559edead8f builtin/stash--helper.c  980) discard_index(&istate);\n1f5a011d90 builtin/stash--helper.c  981) strbuf_release(&untracked_msg);\n1f5a011d90 builtin/stash--helper.c  982) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c  983) return ret;\n1f5a011d90 builtin/stash--helper.c  986) static int stash_patch(struct \nstash_info *info, struct pathspec ps,\n1f5a011d90 builtin/stash--helper.c  989) int ret = 0;\n1f5a011d90 builtin/stash--helper.c  990) struct child_process \ncp_read_tree = CHILD_PROCESS_INIT;\n1f5a011d90 builtin/stash--helper.c  991) struct child_process cp_add_i = \nCHILD_PROCESS_INIT;\n1f5a011d90 builtin/stash--helper.c  992) struct child_process \ncp_diff_tree = CHILD_PROCESS_INIT;\n559edead8f builtin/stash--helper.c  993) struct index_state istate = { \nNULL };\n1f5a011d90 builtin/stash--helper.c  995) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c  997) cp_read_tree.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c  998) \nargv_array_pushl(&cp_read_tree.args, \"read-tree\", \"HEAD\", NULL);\n1f5a011d90 builtin/stash--helper.c  999) \nargv_array_pushf(&cp_read_tree.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c 1001) if (run_command(&cp_read_tree)) {\n1f5a011d90 builtin/stash--helper.c 1002) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1003) goto done;\n1f5a011d90 builtin/stash--helper.c 1007) cp_add_i.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c 1008) \nargv_array_pushl(&cp_add_i.args, \"add--interactive\", \"--patch=stash\",\n1f5a011d90 builtin/stash--helper.c 1010) add_pathspecs(&cp_add_i.args, ps);\n1f5a011d90 builtin/stash--helper.c 1011) \nargv_array_pushf(&cp_add_i.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c 1013) if (run_command(&cp_add_i)) {\n1f5a011d90 builtin/stash--helper.c 1014) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1015) goto done;\n559edead8f builtin/stash--helper.c 1019) if \n(write_index_as_tree(&info->w_tree, &istate, stash_index_path.buf, 0,\n1f5a011d90 builtin/stash--helper.c 1021) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1022) goto done;\n1f5a011d90 builtin/stash--helper.c 1025) cp_diff_tree.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c 1026) \nargv_array_pushl(&cp_diff_tree.args, \"diff-tree\", \"-p\", \"HEAD\",\n1f5a011d90 builtin/stash--helper.c 1027) oid_to_hex(&info->w_tree), \n\"--\", NULL);\n1f5a011d90 builtin/stash--helper.c 1028) if (pipe_command(&cp_diff_tree, \nNULL, 0, out_patch, 0, NULL, 0)) {\n1f5a011d90 builtin/stash--helper.c 1029) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1030) goto done;\n1f5a011d90 builtin/stash--helper.c 1033) if (!out_patch->len) {\n9a95010a11 builtin/stash--helper.c 1034) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1035) fprintf_ln(stderr, _(\"No \nchanges selected\"));\n1f5a011d90 builtin/stash--helper.c 1036) ret = 1;\n559edead8f builtin/stash--helper.c 1040) discard_index(&istate);\n1f5a011d90 builtin/stash--helper.c 1041) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c 1042) return ret;\n1f5a011d90 builtin/stash--helper.c 1045) static int \nstash_working_tree(struct stash_info *info, struct pathspec ps)\n1f5a011d90 builtin/stash--helper.c 1047) int ret = 0;\n1f5a011d90 builtin/stash--helper.c 1049) struct child_process \ncp_upd_index = CHILD_PROCESS_INIT;\n1f5a011d90 builtin/stash--helper.c 1050) struct strbuf diff_output = \nSTRBUF_INIT;\n559edead8f builtin/stash--helper.c 1051) struct index_state istate = { \nNULL };\ned5d77f7d3 builtin/stash.c         1053) init_revisions(&rev, NULL);\n1f5a011d90 builtin/stash--helper.c 1055) \nset_alternate_index_output(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c 1056) if (reset_tree(&info->i_tree, \n0, 0)) {\n1f5a011d90 builtin/stash--helper.c 1057) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1058) goto done;\n1f5a011d90 builtin/stash--helper.c 1060) set_alternate_index_output(NULL);\n1f5a011d90 builtin/stash--helper.c 1062) rev.prune_data = ps;\n1f5a011d90 builtin/stash--helper.c 1063) rev.diffopt.output_format = \nDIFF_FORMAT_CALLBACK;\n1f5a011d90 builtin/stash--helper.c 1064) rev.diffopt.format_callback = \nadd_diff_to_buf;\n1f5a011d90 builtin/stash--helper.c 1065) \nrev.diffopt.format_callback_data = &diff_output;\n1f5a011d90 builtin/stash--helper.c 1067) if \n(read_cache_preload(&rev.diffopt.pathspec) < 0) {\n1f5a011d90 builtin/stash--helper.c 1068) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1069) goto done;\n1f5a011d90 builtin/stash--helper.c 1072) add_pending_object(&rev, \nparse_object(the_repository, &info->b_commit),\n1f5a011d90 builtin/stash--helper.c 1074) if (run_diff_index(&rev, 0)) {\n1f5a011d90 builtin/stash--helper.c 1075) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1076) goto done;\n1f5a011d90 builtin/stash--helper.c 1079) cp_upd_index.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c 1080) \nargv_array_pushl(&cp_upd_index.args, \"update-index\", \"-z\", \"--add\",\n1f5a011d90 builtin/stash--helper.c 1082) \nargv_array_pushf(&cp_upd_index.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c 1085) if (pipe_command(&cp_upd_index, \ndiff_output.buf, diff_output.len,\n1f5a011d90 builtin/stash--helper.c 1087) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1088) goto done;\n559edead8f builtin/stash--helper.c 1091) if \n(write_index_as_tree(&info->w_tree, &istate, stash_index_path.buf, 0,\n1f5a011d90 builtin/stash--helper.c 1093) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1094) goto done;\n559edead8f builtin/stash--helper.c 1098) discard_index(&istate);\n1f5a011d90 builtin/stash--helper.c 1100) object_array_clear(&rev.pending);\n1f5a011d90 builtin/stash--helper.c 1101) strbuf_release(&diff_output);\n1f5a011d90 builtin/stash--helper.c 1102) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c 1103) return ret;\n1f5a011d90 builtin/stash--helper.c 1106) static int \ndo_create_stash(struct pathspec ps, struct strbuf *stash_msg_buf,\n1f5a011d90 builtin/stash--helper.c 1111) int ret = 0;\n1f5a011d90 builtin/stash--helper.c 1112) int flags = 0;\n1f5a011d90 builtin/stash--helper.c 1113) int untracked_commit_option = 0;\n1f5a011d90 builtin/stash--helper.c 1114) const char *head_short_sha1 = NULL;\n1f5a011d90 builtin/stash--helper.c 1115) const char *branch_ref = NULL;\n1f5a011d90 builtin/stash--helper.c 1116) const char *branch_name = \"(no \nbranch)\";\n1f5a011d90 builtin/stash--helper.c 1117) struct commit *head_commit = NULL;\n1f5a011d90 builtin/stash--helper.c 1118) struct commit_list *parents = NULL;\n1f5a011d90 builtin/stash--helper.c 1119) struct strbuf msg = STRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c 1120) struct strbuf commit_tree_label \n= STRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c 1121) struct strbuf untracked_files = \nSTRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c 1123) prepare_fallback_ident(\"git \nstash\", \"git@stash\");\n1f5a011d90 builtin/stash--helper.c 1125) read_cache_preload(NULL);\n1f5a011d90 builtin/stash--helper.c 1126) refresh_cache(REFRESH_QUIET);\n1f5a011d90 builtin/stash--helper.c 1128) if (get_oid(\"HEAD\", \n&info->b_commit)) {\n9a95010a11 builtin/stash--helper.c 1129) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1130) fprintf_ln(stderr, _(\"You do \nnot have \"\n1f5a011d90 builtin/stash--helper.c 1132) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1133) goto done;\n1f5a011d90 builtin/stash--helper.c 1135) head_commit = \nlookup_commit(the_repository, &info->b_commit);\n168e6cff5e builtin/stash--helper.c 1138) if (!check_changes(ps, \ninclude_untracked, &untracked_files)) {\n1f5a011d90 builtin/stash--helper.c 1139) ret = 1;\n1f5a011d90 builtin/stash--helper.c 1140) goto done;\n1f5a011d90 builtin/stash--helper.c 1143) branch_ref = \nresolve_ref_unsafe(\"HEAD\", 0, NULL, &flags);\n1f5a011d90 builtin/stash--helper.c 1144) if (flags & REF_ISSYMREF)\n1f5a011d90 builtin/stash--helper.c 1145) branch_name = \nstrrchr(branch_ref, '/') + 1;\n1f5a011d90 builtin/stash--helper.c 1146) head_short_sha1 = \nfind_unique_abbrev(&head_commit->object.oid,\n1f5a011d90 builtin/stash--helper.c 1148) strbuf_addf(&msg, \"%s: %s \", \nbranch_name, head_short_sha1);\n1f5a011d90 builtin/stash--helper.c 1149) \npp_commit_easy(CMIT_FMT_ONELINE, head_commit, &msg);\n1f5a011d90 builtin/stash--helper.c 1151) strbuf_addf(&commit_tree_label, \n\"index on %s\\n\", msg.buf);\n1f5a011d90 builtin/stash--helper.c 1152) commit_list_insert(head_commit, \n&parents);\n1f5a011d90 builtin/stash--helper.c 1153) if \n(write_cache_as_tree(&info->i_tree, 0, NULL) ||\n1f5a011d90 builtin/stash--helper.c 1154) \ncommit_tree(commit_tree_label.buf, commit_tree_label.len,\n1f5a011d90 builtin/stash--helper.c 1155) &info->i_tree, parents, \n&info->i_commit, NULL, NULL)) {\n9a95010a11 builtin/stash--helper.c 1156) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1157) fprintf_ln(stderr, _(\"Cannot \nsave the current \"\n1f5a011d90 builtin/stash--helper.c 1159) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1160) goto done;\n168e6cff5e builtin/stash--helper.c 1163) if (include_untracked) {\n1f5a011d90 builtin/stash--helper.c 1164) if (save_untracked_files(info, \n&msg, untracked_files)) {\n9a95010a11 builtin/stash--helper.c 1165) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1166) fprintf_ln(stderr, _(\"Cannot save \"\n1f5a011d90 builtin/stash--helper.c 1168) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1169) goto done;\n1f5a011d90 builtin/stash--helper.c 1171) untracked_commit_option = 1;\n1f5a011d90 builtin/stash--helper.c 1173) if (patch_mode) {\n9a95010a11 builtin/stash--helper.c 1174) ret = stash_patch(info, ps, \npatch, quiet);\n1f5a011d90 builtin/stash--helper.c 1175) if (ret < 0) {\n9a95010a11 builtin/stash--helper.c 1176) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1177) fprintf_ln(stderr, _(\"Cannot \nsave the current \"\n1f5a011d90 builtin/stash--helper.c 1179) goto done;\n1f5a011d90 builtin/stash--helper.c 1180) } else if (ret > 0) {\n1f5a011d90 builtin/stash--helper.c 1181) goto done;\n1f5a011d90 builtin/stash--helper.c 1184) if (stash_working_tree(info, ps)) {\n9a95010a11 builtin/stash--helper.c 1185) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1186) fprintf_ln(stderr, _(\"Cannot \nsave the current \"\n1f5a011d90 builtin/stash--helper.c 1188) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1189) goto done;\n1f5a011d90 builtin/stash--helper.c 1193) if (!stash_msg_buf->len)\n1f5a011d90 builtin/stash--helper.c 1194) strbuf_addf(stash_msg_buf, \"WIP \non %s\", msg.buf);\n1f5a011d90 builtin/stash--helper.c 1196) strbuf_insertf(stash_msg_buf, \n0, \"On %s: \", branch_name);\n1f5a011d90 builtin/stash--helper.c 1202) parents = NULL;\n1f5a011d90 builtin/stash--helper.c 1203) if (untracked_commit_option)\n1f5a011d90 builtin/stash--helper.c 1204) \ncommit_list_insert(lookup_commit(the_repository,\n1f5a011d90 builtin/stash--helper.c 1205) &info->u_commit),\n1f5a011d90 builtin/stash--helper.c 1207) \ncommit_list_insert(lookup_commit(the_repository, &info->i_commit),\n1f5a011d90 builtin/stash--helper.c 1209) commit_list_insert(head_commit, \n&parents);\n1f5a011d90 builtin/stash--helper.c 1211) if \n(commit_tree(stash_msg_buf->buf, stash_msg_buf->len, &info->w_tree,\n9a95010a11 builtin/stash--helper.c 1213) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1214) fprintf_ln(stderr, _(\"Cannot \nrecord \"\n1f5a011d90 builtin/stash--helper.c 1216) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1217) goto done;\n1f5a011d90 builtin/stash--helper.c 1221) strbuf_release(&commit_tree_label);\n1f5a011d90 builtin/stash--helper.c 1222) strbuf_release(&msg);\n1f5a011d90 builtin/stash--helper.c 1223) strbuf_release(&untracked_files);\n1f5a011d90 builtin/stash--helper.c 1224) return ret;\n1f5a011d90 builtin/stash--helper.c 1227) static int create_stash(int \nargc, const char **argv, const char *prefix)\n1f5a011d90 builtin/stash--helper.c 1229) int ret = 0;\n1f5a011d90 builtin/stash--helper.c 1230) struct strbuf stash_msg_buf = \nSTRBUF_INIT;\n51809c70ca builtin/stash.c         1235) \nstrbuf_join_argv(&stash_msg_buf, argc - 1, ++argv, ' ');\n1f5a011d90 builtin/stash--helper.c 1237) memset(&ps, 0, sizeof(ps));\n168e6cff5e builtin/stash--helper.c 1238) if \n(!check_changes_tracked_files(ps))\n168e6cff5e builtin/stash--helper.c 1239) return 0;\n168e6cff5e builtin/stash--helper.c 1241) if (!(ret = do_create_stash(ps, \n&stash_msg_buf, 0, 0, &info, NULL, 0)))\n1f5a011d90 builtin/stash--helper.c 1242) printf_ln(\"%s\", \noid_to_hex(&info.w_commit));\n1f5a011d90 builtin/stash--helper.c 1244) strbuf_release(&stash_msg_buf);\n168e6cff5e builtin/stash--helper.c 1245) return ret;\nfa38428f76 builtin/stash--helper.c 1248) static int do_push_stash(struct \npathspec ps, const char *stash_msg, int quiet,\nfa38428f76 builtin/stash--helper.c 1251) int ret = 0;\nfa38428f76 builtin/stash--helper.c 1253) struct strbuf patch = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1254) struct strbuf stash_msg_buf = \nSTRBUF_INIT;\n168e6cff5e builtin/stash--helper.c 1255) struct strbuf untracked_files = \nSTRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1257) if (patch_mode && keep_index == -1)\nfa38428f76 builtin/stash--helper.c 1258) keep_index = 1;\nfa38428f76 builtin/stash--helper.c 1260) if (patch_mode && \ninclude_untracked) {\nfa38428f76 builtin/stash--helper.c 1261) fprintf_ln(stderr, _(\"Can't use \n--patch and --include-untracked\"\nfa38428f76 builtin/stash--helper.c 1263) ret = -1;\nfa38428f76 builtin/stash--helper.c 1264) goto done;\nfa38428f76 builtin/stash--helper.c 1267) read_cache_preload(NULL);\nfa38428f76 builtin/stash--helper.c 1268) if (!include_untracked && ps.nr) {\nfa38428f76 builtin/stash--helper.c 1270) char *ps_matched = \nxcalloc(ps.nr, 1);\nfa38428f76 builtin/stash--helper.c 1272) for (i = 0; i < active_nr; i++)\nfa38428f76 builtin/stash--helper.c 1273) ce_path_match(&the_index, \nactive_cache[i], &ps,\nfa38428f76 builtin/stash--helper.c 1276) if \n(report_path_error(ps_matched, &ps, NULL)) {\nfa38428f76 builtin/stash--helper.c 1277) fprintf_ln(stderr, _(\"Did you \nforget to 'git add'?\"));\nfa38428f76 builtin/stash--helper.c 1278) ret = -1;\nfa38428f76 builtin/stash--helper.c 1279) free(ps_matched);\nfa38428f76 builtin/stash--helper.c 1280) goto done;\nfa38428f76 builtin/stash--helper.c 1282) free(ps_matched);\nfa38428f76 builtin/stash--helper.c 1285) if (refresh_cache(REFRESH_QUIET)) {\nfa38428f76 builtin/stash--helper.c 1286) ret = -1;\nfa38428f76 builtin/stash--helper.c 1287) goto done;\n168e6cff5e builtin/stash--helper.c 1290) if (!check_changes(ps, \ninclude_untracked, &untracked_files)) {\nfa38428f76 builtin/stash--helper.c 1291) if (!quiet)\nfa38428f76 builtin/stash--helper.c 1292) printf_ln(_(\"No local changes \nto save\"));\nfa38428f76 builtin/stash--helper.c 1293) goto done;\nfa38428f76 builtin/stash--helper.c 1296) if (!reflog_exists(ref_stash) \n&& do_clear_stash()) {\nfa38428f76 builtin/stash--helper.c 1297) ret = -1;\n9a95010a11 builtin/stash--helper.c 1298) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1299) fprintf_ln(stderr, _(\"Cannot \ninitialize stash\"));\nfa38428f76 builtin/stash--helper.c 1300) goto done;\nfa38428f76 builtin/stash--helper.c 1303) if (stash_msg)\nfa38428f76 builtin/stash--helper.c 1304) strbuf_addstr(&stash_msg_buf, \nstash_msg);\nfa38428f76 builtin/stash--helper.c 1305) if (do_create_stash(ps, \n&stash_msg_buf, include_untracked, patch_mode,\nfa38428f76 builtin/stash--helper.c 1307) ret = -1;\nfa38428f76 builtin/stash--helper.c 1308) goto done;\nfa38428f76 builtin/stash--helper.c 1311) if \n(do_store_stash(&info.w_commit, stash_msg_buf.buf, 1)) {\nfa38428f76 builtin/stash--helper.c 1312) ret = -1;\n9a95010a11 builtin/stash--helper.c 1313) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1314) fprintf_ln(stderr, _(\"Cannot \nsave the current status\"));\nfa38428f76 builtin/stash--helper.c 1315) goto done;\n9a95010a11 builtin/stash--helper.c 1318) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1319) printf_ln(_(\"Saved working \ndirectory and index state %s\"),\nfa38428f76 builtin/stash--helper.c 1322) if (!patch_mode) {\nfa38428f76 builtin/stash--helper.c 1323) if (include_untracked && !ps.nr) {\nfa38428f76 builtin/stash--helper.c 1324) struct child_process cp = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1326) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1327) argv_array_pushl(&cp.args, \n\"clean\", \"--force\",\nfa38428f76 builtin/stash--helper.c 1329) if (include_untracked == \nINCLUDE_ALL_FILES)\nfa38428f76 builtin/stash--helper.c 1330) argv_array_push(&cp.args, \"-x\");\nfa38428f76 builtin/stash--helper.c 1331) if (run_command(&cp)) {\nfa38428f76 builtin/stash--helper.c 1332) ret = -1;\nfa38428f76 builtin/stash--helper.c 1333) goto done;\nfa38428f76 builtin/stash--helper.c 1336) if (ps.nr) {\nfa38428f76 builtin/stash--helper.c 1337) struct child_process cp_add = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1338) struct child_process cp_diff = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1339) struct child_process cp_apply = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1340) struct strbuf out = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1342) cp_add.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1343) argv_array_push(&cp_add.args, \n\"add\");\nfa38428f76 builtin/stash--helper.c 1344) if (!include_untracked)\nfa38428f76 builtin/stash--helper.c 1345) argv_array_push(&cp_add.args, \n\"-u\");\nfa38428f76 builtin/stash--helper.c 1346) if (include_untracked == \nINCLUDE_ALL_FILES)\nfa38428f76 builtin/stash--helper.c 1347) argv_array_push(&cp_add.args, \n\"--force\");\nfa38428f76 builtin/stash--helper.c 1348) argv_array_push(&cp_add.args, \n\"--\");\nfa38428f76 builtin/stash--helper.c 1349) add_pathspecs(&cp_add.args, ps);\nfa38428f76 builtin/stash--helper.c 1350) if (run_command(&cp_add)) {\nfa38428f76 builtin/stash--helper.c 1351) ret = -1;\nfa38428f76 builtin/stash--helper.c 1352) goto done;\nfa38428f76 builtin/stash--helper.c 1355) cp_diff.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1356) argv_array_pushl(&cp_diff.args, \n\"diff-index\", \"-p\",\nfa38428f76 builtin/stash--helper.c 1359) add_pathspecs(&cp_diff.args, ps);\nfa38428f76 builtin/stash--helper.c 1360) if (pipe_command(&cp_diff, \nNULL, 0, &out, 0, NULL, 0)) {\nfa38428f76 builtin/stash--helper.c 1361) ret = -1;\nfa38428f76 builtin/stash--helper.c 1362) goto done;\nfa38428f76 builtin/stash--helper.c 1365) cp_apply.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1366) \nargv_array_pushl(&cp_apply.args, \"apply\", \"--index\",\nfa38428f76 builtin/stash--helper.c 1368) if (pipe_command(&cp_apply, \nout.buf, out.len, NULL, 0,\nfa38428f76 builtin/stash--helper.c 1370) ret = -1;\nfa38428f76 builtin/stash--helper.c 1371) goto done;\nfa38428f76 builtin/stash--helper.c 1374) struct child_process cp = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1375) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1376) argv_array_pushl(&cp.args, \n\"reset\", \"--hard\", \"-q\",\nfa38428f76 builtin/stash--helper.c 1378) if (run_command(&cp)) {\nfa38428f76 builtin/stash--helper.c 1379) ret = -1;\nfa38428f76 builtin/stash--helper.c 1380) goto done;\nfa38428f76 builtin/stash--helper.c 1384) if (keep_index == 1 && \n!is_null_oid(&info.i_tree)) {\nfa38428f76 builtin/stash--helper.c 1385) struct child_process cp_ls = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1386) struct child_process \ncp_checkout = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1387) struct strbuf out = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1389) if (reset_tree(&info.i_tree, 0, \n1)) {\nfa38428f76 builtin/stash--helper.c 1390) ret = -1;\nfa38428f76 builtin/stash--helper.c 1391) goto done;\nfa38428f76 builtin/stash--helper.c 1394) cp_ls.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1395) argv_array_pushl(&cp_ls.args, \n\"ls-files\", \"-z\",\nfa38428f76 builtin/stash--helper.c 1398) add_pathspecs(&cp_ls.args, ps);\nfa38428f76 builtin/stash--helper.c 1399) if (pipe_command(&cp_ls, NULL, \n0, &out, 0, NULL, 0)) {\nfa38428f76 builtin/stash--helper.c 1400) ret = -1;\nfa38428f76 builtin/stash--helper.c 1401) goto done;\nfa38428f76 builtin/stash--helper.c 1404) cp_checkout.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1405) \nargv_array_pushl(&cp_checkout.args, \"checkout-index\",\nfa38428f76 builtin/stash--helper.c 1407) if (pipe_command(&cp_checkout, \nout.buf, out.len, NULL,\nfa38428f76 builtin/stash--helper.c 1409) ret = -1;\nfa38428f76 builtin/stash--helper.c 1410) goto done;\nfa38428f76 builtin/stash--helper.c 1413) goto done;\nfa38428f76 builtin/stash--helper.c 1415) struct child_process cp = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1417) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1418) argv_array_pushl(&cp.args, \n\"apply\", \"-R\", NULL);\nfa38428f76 builtin/stash--helper.c 1420) if (pipe_command(&cp, \npatch.buf, patch.len, NULL, 0, NULL, 0)) {\n9a95010a11 builtin/stash--helper.c 1421) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1422) fprintf_ln(stderr, _(\"Cannot \nremove \"\nfa38428f76 builtin/stash--helper.c 1424) ret = -1;\nfa38428f76 builtin/stash--helper.c 1425) goto done;\nfa38428f76 builtin/stash--helper.c 1428) if (keep_index < 1) {\nfa38428f76 builtin/stash--helper.c 1429) struct child_process cp = \nCHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1431) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1432) argv_array_pushl(&cp.args, \n\"reset\", \"-q\", \"--\", NULL);\nfa38428f76 builtin/stash--helper.c 1433) add_pathspecs(&cp.args, ps);\nfa38428f76 builtin/stash--helper.c 1434) if (run_command(&cp)) {\nfa38428f76 builtin/stash--helper.c 1435) ret = -1;\nfa38428f76 builtin/stash--helper.c 1436) goto done;\nfa38428f76 builtin/stash--helper.c 1439) goto done;\nfa38428f76 builtin/stash--helper.c 1443) strbuf_release(&stash_msg_buf);\nfa38428f76 builtin/stash--helper.c 1444) return ret;\nfa38428f76 builtin/stash--helper.c 1447) static int push_stash(int argc, \nconst char **argv, const char *prefix)\nfa38428f76 builtin/stash--helper.c 1449) int keep_index = -1;\nfa38428f76 builtin/stash--helper.c 1450) int patch_mode = 0;\nfa38428f76 builtin/stash--helper.c 1451) int include_untracked = 0;\nfa38428f76 builtin/stash--helper.c 1452) int quiet = 0;\nfa38428f76 builtin/stash--helper.c 1453) const char *stash_msg = NULL;\nfa38428f76 builtin/stash--helper.c 1455) struct option options[] = {\n51809c70ca builtin/stash.c         1470) if (argc)\n51809c70ca builtin/stash.c         1471) argc = parse_options(argc, \nargv, prefix, options,\nfa38428f76 builtin/stash--helper.c 1475) parse_pathspec(&ps, 0, \nPATHSPEC_PREFER_FULL, prefix, argv);\nfa38428f76 builtin/stash--helper.c 1476) return do_push_stash(ps, \nstash_msg, quiet, keep_index, patch_mode,\ncf5b27d699 builtin/stash--helper.c 1480) static int save_stash(int argc, \nconst char **argv, const char *prefix)\ncf5b27d699 builtin/stash--helper.c 1482) int keep_index = -1;\ncf5b27d699 builtin/stash--helper.c 1483) int patch_mode = 0;\ncf5b27d699 builtin/stash--helper.c 1484) int include_untracked = 0;\ncf5b27d699 builtin/stash--helper.c 1485) int quiet = 0;\ncf5b27d699 builtin/stash--helper.c 1486) int ret = 0;\ncf5b27d699 builtin/stash--helper.c 1487) const char *stash_msg = NULL;\ncf5b27d699 builtin/stash--helper.c 1489) struct strbuf stash_msg_buf = \nSTRBUF_INIT;\ncf5b27d699 builtin/stash--helper.c 1490) struct option options[] = {\ncf5b27d699 builtin/stash--helper.c 1505) argc = parse_options(argc, \nargv, prefix, options,\ncf5b27d699 builtin/stash--helper.c 1509) if (argc)\ncf5b27d699 builtin/stash--helper.c 1510) stash_msg = \nstrbuf_join_argv(&stash_msg_buf, argc, argv, ' ');\ncf5b27d699 builtin/stash--helper.c 1512) memset(&ps, 0, sizeof(ps));\ncf5b27d699 builtin/stash--helper.c 1513) ret = do_push_stash(ps, \nstash_msg, quiet, keep_index,\ncf5b27d699 builtin/stash--helper.c 1516) strbuf_release(&stash_msg_buf);\ncf5b27d699 builtin/stash--helper.c 1517) return ret;\nbec65d5b78 builtin/stash.c         1527) return env;\n26799a208f builtin/stash.c         1537) strbuf_trim(&out);\n26799a208f builtin/stash.c         1538) ret = !strcmp(\"true\", out.buf);\n26799a208f builtin/stash.c         1539) strbuf_release(&out);\n26799a208f builtin/stash.c         1555) const char *path = \nmkpath(\"%s/git-legacy-stash\",\n26799a208f builtin/stash.c         1558) if (sane_execvp(path, (char \n**)argv) < 0)\n26799a208f builtin/stash.c         1559) die_errno(_(\"could not exec \n%s\"), path);\nf6bbd78127 builtin/stash--helper.c 1573) index_file = get_index_file();\nf6bbd78127 builtin/stash--helper.c 1574) strbuf_addf(&stash_index_path, \n\"%s.stash.%\" PRIuMAX, index_file,\n51809c70ca builtin/stash.c         1577) if (!argc)\n51809c70ca builtin/stash.c         1578) return !!push_stash(0, NULL, \nprefix);\n51809c70ca builtin/stash.c         1579) else if (!strcmp(argv[0], \"apply\"))\nf6bbd78127 builtin/stash--helper.c 1580) return !!apply_stash(argc, \nargv, prefix);\ncdca49bc4c builtin/stash--helper.c 1581) else if (!strcmp(argv[0], \"clear\"))\ncdca49bc4c builtin/stash--helper.c 1582) return !!clear_stash(argc, \nargv, prefix);\ncdca49bc4c builtin/stash--helper.c 1583) else if (!strcmp(argv[0], \"drop\"))\ncdca49bc4c builtin/stash--helper.c 1584) return !!drop_stash(argc, argv, \nprefix);\ne1d01876a4 builtin/stash--helper.c 1585) else if (!strcmp(argv[0], \"pop\"))\ne1d01876a4 builtin/stash--helper.c 1586) return !!pop_stash(argc, argv, \nprefix);\nf596f3366c builtin/stash--helper.c 1587) else if (!strcmp(argv[0], \n\"branch\"))\nf596f3366c builtin/stash--helper.c 1588) return !!branch_stash(argc, \nargv, prefix);\n9b77b07ba4 builtin/stash--helper.c 1589) else if (!strcmp(argv[0], \"list\"))\n9b77b07ba4 builtin/stash--helper.c 1590) return !!list_stash(argc, argv, \nprefix);\nb4493f269e builtin/stash--helper.c 1591) else if (!strcmp(argv[0], \"show\"))\nb4493f269e builtin/stash--helper.c 1592) return !!show_stash(argc, argv, \nprefix);\n847eb0b0a8 builtin/stash--helper.c 1593) else if (!strcmp(argv[0], \"store\"))\n847eb0b0a8 builtin/stash--helper.c 1594) return !!store_stash(argc, \nargv, prefix);\n1f5a011d90 builtin/stash--helper.c 1595) else if (!strcmp(argv[0], \n\"create\"))\n1f5a011d90 builtin/stash--helper.c 1596) return !!create_stash(argc, \nargv, prefix);\nfa38428f76 builtin/stash--helper.c 1597) else if (!strcmp(argv[0], \"push\"))\nfa38428f76 builtin/stash--helper.c 1598) return !!push_stash(argc, argv, \nprefix);\ncf5b27d699 builtin/stash--helper.c 1599) else if (!strcmp(argv[0], \"save\"))\ncf5b27d699 builtin/stash--helper.c 1600) return !!save_stash(argc, argv, \nprefix);\n51809c70ca builtin/stash.c         1601) else if (*argv[0] != '-')\n51809c70ca builtin/stash.c         1602) \nusage_msg_opt(xstrfmt(_(\"unknown subcommand: %s\"), argv[0]),\n51809c70ca builtin/stash.c         1605) if (strcmp(argv[0], \"-p\")) {\n51809c70ca builtin/stash.c         1606) while (++i < argc && \nstrcmp(argv[i], \"--\")) {\n51809c70ca builtin/stash.c         1611) if ((strlen(argv[i]) == 2) && \n*argv[i] == '-' &&\n51809c70ca builtin/stash.c         1612)     strchr(\"akpqu\", argv[i][1]))\n51809c70ca builtin/stash.c         1613) continue;\n51809c70ca builtin/stash.c         1615) if (!strcmp(argv[i], \"--all\") ||\n51809c70ca builtin/stash.c         1616)     !strcmp(argv[i], \n\"--keep-index\") ||\n51809c70ca builtin/stash.c         1617)     !strcmp(argv[i], \n\"--no-keep-index\") ||\n51809c70ca builtin/stash.c         1618)     !strcmp(argv[i], \"--patch\") ||\n51809c70ca builtin/stash.c         1619)     !strcmp(argv[i], \"--quiet\") ||\n51809c70ca builtin/stash.c         1620)     !strcmp(argv[i], \n\"--include-untracked\"))\n51809c70ca builtin/stash.c         1621) continue;\n51809c70ca builtin/stash.c         1628) if (starts_with(argv[i], \"-m\") ||\n51809c70ca builtin/stash.c         1629) starts_with(argv[i], \"--message=\"))\n51809c70ca builtin/stash.c         1630) continue;\n51809c70ca builtin/stash.c         1632) \nusage_with_options(git_stash_usage, options);\n51809c70ca builtin/stash.c         1636) argv_array_push(&args, \"push\");\n51809c70ca builtin/stash.c         1637) argv_array_pushv(&args, argv);\n51809c70ca builtin/stash.c         1638) return !!push_stash(args.argc, \nargs.argv, prefix);\n\nbuiltin/update-index.c\n08339886b9 builtin/update-index.c  895) static enum parse_opt_result \nstdin_callback(\n9b4ae5190a builtin/update-index.c  902) BUG_ON_OPT_ARG(arg);\n08339886b9 builtin/update-index.c  910) static enum parse_opt_result \nunresolve_callback(\n9b4ae5190a builtin/update-index.c  918) BUG_ON_OPT_ARG(arg);\n08339886b9 builtin/update-index.c  931) static enum parse_opt_result \nreupdate_callback(\n9b4ae5190a builtin/update-index.c  939) BUG_ON_OPT_ARG(arg);\n\nbuiltin/upload-archive.c\n6da1f1a920 builtin/upload-archive.c  86) \nregister_allowed_protocol_version(protocol_v0);\n\ncommit-graph.c\n97b202471c  885) for_each_object_in_pack(p, add_packed_commits, &oids,\n97b202471c  932) for_each_packed_object(add_packed_commits, &oids,\n\nconfig.c\n06800238c6 1684) worktree_config = mkpathdup(\"%s/config.worktree\", \nopts->git_dir);\n06800238c6 1709) ret += git_config_from_file(fn, worktree_config, data);\n8f7c7f5555 2147) int repo_config_set_gently(struct repository *r,\n8f7c7f5555 2150) char *path = repo_git_path(r, \"config\");\n8f7c7f5555 2151) int ret = git_config_set_multivar_in_file_gently(path, \nkey, value, NULL, 0);\n8f7c7f5555 2152) free(path);\n8f7c7f5555 2153) return ret;\n8f7c7f5555 2156) void repo_config_set(struct repository *r, const char \n*key, const char *value)\n8f7c7f5555 2158) if (!repo_config_set_gently(r, key, value))\n8f7c7f5555 2159) return;\n8f7c7f5555 2160) if (value)\n8f7c7f5555 2161) die(_(\"could not set '%s' to '%s'\"), key, value);\n8f7c7f5555 2163) die(_(\"could not unset '%s'\"), key);\n8f7c7f5555 2166) int repo_config_set_worktree_gently(struct repository *r,\n8f7c7f5555 2172) path = get_worktree_config(r);\n8f7c7f5555 2173) if (!path)\n8f7c7f5555 2174) return CONFIG_INVALID_FILE;\n8f7c7f5555 2175) ret = git_config_set_multivar_in_file_gently(path, key, \nvalue, NULL, 0);\n8f7c7f5555 2176) free(path);\n8f7c7f5555 2177) return ret;\n\nconnect.c\n6da1f1a920 1085) strbuf_addch(&request, '\\0');\n6da1f1a920 1086) strbuf_addf(&request, \"%s%c\", version_advert->buf, '\\0');\n6da1f1a920 1103) if (variant == VARIANT_SSH) {\n6da1f1a920 1106) argv_array_pushf(env, GIT_PROTOCOL_ENVIRONMENT \"=%s\",\n6da1f1a920 1194) push_ssh_options(&detect.args, &detect.env_array, \nVARIANT_SSH,\n6da1f1a920 1202) push_ssh_options(&conn->args, &conn->env_array, \nvariant, port,\n6da1f1a920 1241) conn = git_connect_git(fd, hostandport, path, prog,\n6da1f1a920 1285) fill_ssh_args(conn, ssh_host, port, &version_advert,\n\ndate.c\nacdd37769d  113) die(\"Timestamp too large for this system: %\"PRItime, time);\n6943bd42fb  137) gettimeofday(now, NULL);\nacdd37769d  245) hide.date = 1;\nacdd37769d  926) return DATE_HUMAN;\n86177eb5c4  943) if (isatty(1) || pager_in_use())\n86177eb5c4  944) format = p;\n86177eb5c4  946) format = \"default\";\n\ndiff-no-index.c\n963389f6e7 268) if (implicit_no_index)\n963389f6e7 269) warning(_(\"Not a git repository. Use --no-index to \"\n963389f6e7 271) usage_with_options(diff_no_index_usage, options);\n963389f6e7 305) return 1;\n\ndiff.c\n0eb03c4cd0 4745) width = strtoul(value, &end, 10);\n0eb03c4cd0 4746) if (*end == ',')\n0eb03c4cd0 4747) name_width = strtoul(end+1, &end, 10);\n0eb03c4cd0 4748) if (*end == ',')\n0eb03c4cd0 4749) count = strtoul(end+1, &end, 10);\n0eb03c4cd0 4750) if (*end)\n0eb03c4cd0 4751) return error(_(\"invalid --stat value: %s\"), value);\n0eb03c4cd0 4753) } else if (!strcmp(opt->long_name, \"stat-width\")) {\n0eb03c4cd0 4754) width = strtoul(value, &end, 10);\n0eb03c4cd0 4755) if (*end)\n0eb03c4cd0 4756) return error(_(\"%s expects a numerical value\"),\n0eb03c4cd0 4758) } else if (!strcmp(opt->long_name, \"stat-name-width\")) {\n0eb03c4cd0 4759) name_width = strtoul(value, &end, 10);\n0eb03c4cd0 4760) if (*end)\n0eb03c4cd0 4761) return error(_(\"%s expects a numerical value\"),\n0eb03c4cd0 4763) } else if (!strcmp(opt->long_name, \"stat-graph-width\")) {\n0eb03c4cd0 4764) graph_width = strtoul(value, &end, 10);\n0eb03c4cd0 4765) if (*end)\n0eb03c4cd0 4766) return error(_(\"%s expects a numerical value\"),\n0eb03c4cd0 4768) } else if (!strcmp(opt->long_name, \"stat-count\")) {\n0eb03c4cd0 4769) count = strtoul(value, &end, 10);\n0eb03c4cd0 4770) if (*end)\n0eb03c4cd0 4771) return error(_(\"%s expects a numerical value\"),\nb74a81799d 4836) static int diff_opt_diff_filter(const struct option \n*option,\nb74a81799d 4839) struct diff_options *opt = option->value;\nb74a81799d 4842) BUG_ON_OPT_NEG(unset);\nb74a81799d 4873) return error(_(\"unknown change class '%c' in \n--diff-filter=%s\"),\n8b70e41773 4889) static int diff_opt_ws_error_highlight(const struct \noption *option,\n8b70e41773 4892) struct diff_options *opt = option->value;\n8b70e41773 4895) BUG_ON_OPT_NEG(unset);\n8b70e41773 4896) if (val < 0)\n8b70e41773 4897) return error(\"unknown value after ws-error-highlight=%.*s\",\n8b70e41773 4900) return 0;\n5866e9ce9a 4903) static int diff_opt_find_object(const struct option \n*option,\n5866e9ce9a 4906) struct diff_options *opt = option->value;\n5866e9ce9a 4909) BUG_ON_OPT_NEG(unset);\n5866e9ce9a 4911) return error(_(\"unable to resolve '%s'\"), arg);\n5866e9ce9a 4920) return 0;\nb065b66077 4923) static int diff_opt_anchored(const struct option *opt,\nb065b66077 4926) struct diff_options *options = opt->value;\nb065b66077 4928) BUG_ON_OPT_NEG(unset);\nb065b66077 4929) options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);\nb065b66077 4930) ALLOC_GROW(options->anchors, options->anchors_nr + 1,\nb065b66077 4932) options->anchors[options->anchors_nr++] = xstrdup(arg);\nb065b66077 4933) return 0;\n6d0300b2e3 4936) static int diff_opt_binary(const struct option *opt,\n6d0300b2e3 4939) struct diff_options *options = opt->value;\n6d0300b2e3 4941) BUG_ON_OPT_NEG(unset);\n6d0300b2e3 4942) BUG_ON_OPT_ARG(arg);\n6d0300b2e3 4943) enable_patch_output(&options->output_format);\n6d0300b2e3 4944) options->flags.binary = 1;\n6d0300b2e3 4945) return 0;\nb9b760ed1c 4948) static int diff_opt_break_rewrites(const struct option \n*opt,\nb9b760ed1c 4951) int *break_opt = opt->value;\nb9b760ed1c 4954) BUG_ON_OPT_NEG(unset);\nb9b760ed1c 4955) if (!arg)\nb9b760ed1c 4956) arg = \"\";\nb9b760ed1c 4957) opt1 = parse_rename_score(&arg);\nb9b760ed1c 4958) switch (*arg) {\nb9b760ed1c 4960) opt2 = 0;\nb9b760ed1c 4961) break;\nb9b760ed1c 4963) arg++;\nb9b760ed1c 4964) opt2 = parse_rename_score(&arg);\nb9b760ed1c 4965) break;\nb9b760ed1c 4967) if (*arg != 0)\nb9b760ed1c 4968) return error(_(\"%s expects <n>/<m> form\"), opt->long_name);\nb9b760ed1c 4969) *break_opt = opt1 | (opt2 << 16);\nb9b760ed1c 4970) return 0;\n3d810d1860 4973) static int diff_opt_char(const struct option *opt,\n3d810d1860 4976) char *value = opt->value;\n3d810d1860 4978) BUG_ON_OPT_NEG(unset);\n3d810d1860 4979) if (arg[1])\n3d810d1860 4980) return error(_(\"%s expects a character, got '%s'\"),\n3d810d1860 4982) *value = arg[0];\n3d810d1860 4983) return 0;\n221d676696 4986) static int diff_opt_color_moved(const struct option *opt,\n221d676696 4989) struct diff_options *options = opt->value;\n221d676696 4991) if (unset) {\n221d676696 4992) options->color_moved = COLOR_MOVED_NO;\n221d676696 4993) } else if (!arg) {\n221d676696 5004) return 0;\n7c33a67a2e 5007) static int diff_opt_color_moved_ws(const struct option \n*opt,\n7c33a67a2e 5010) struct diff_options *options = opt->value;\nda9db54b3e 5013) if (unset) {\nda9db54b3e 5015) return 0;\n7c33a67a2e 5018) cm = parse_color_moved_ws(arg);\n7c33a67a2e 5019) if (cm & COLOR_MOVED_WS_ERROR)\n7c33a67a2e 5020) return error(_(\"invalid mode '%s' in \n--color-moved-ws\"), arg);\n7c33a67a2e 5021) options->color_moved_ws_handling = cm;\n7c33a67a2e 5022) return 0;\nf3b49b7f9e 5025) static int diff_opt_color_words(const struct option *opt,\nf3b49b7f9e 5028) struct diff_options *options = opt->value;\nf3b49b7f9e 5030) BUG_ON_OPT_NEG(unset);\nf3b49b7f9e 5031) options->use_color = 1;\nf3b49b7f9e 5032) options->word_diff = DIFF_WORDS_COLOR;\nf3b49b7f9e 5033) options->word_regex = arg;\nf3b49b7f9e 5034) return 0;\n58c7ef398e 5037) static int diff_opt_compact_summary(const struct option \n*opt,\n58c7ef398e 5040) struct diff_options *options = opt->value;\n58c7ef398e 5042) BUG_ON_OPT_ARG(arg);\n58c7ef398e 5043) if (unset) {\n58c7ef398e 5044) options->flags.stat_with_summary = 0;\n58c7ef398e 5046) options->flags.stat_with_summary = 1;\n58c7ef398e 5047) options->output_format |= DIFF_FORMAT_DIFFSTAT;\n58c7ef398e 5049) return 0;\n1efc2689d6 5052) static int diff_opt_diff_algorithm(const struct option \n*opt,\n1efc2689d6 5055) struct diff_options *options = opt->value;\n1efc2689d6 5056) long value = parse_algorithm_value(arg);\n1efc2689d6 5058) BUG_ON_OPT_NEG(unset);\n1efc2689d6 5059) if (value < 0)\n1efc2689d6 5060) return error(_(\"option diff-algorithm accepts \\\"myers\\\", \"\n1efc2689d6 5064) DIFF_XDL_CLR(options, NEED_MINIMAL);\n1efc2689d6 5065) options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;\n1efc2689d6 5066) options->xdl_opts |= value;\n1efc2689d6 5067) return 0;\nf8d10810d3 5070) static int diff_opt_dirstat(const struct option *opt,\nf8d10810d3 5073) struct diff_options *options = opt->value;\nf8d10810d3 5075) BUG_ON_OPT_NEG(unset);\nf8d10810d3 5076) if (!strcmp(opt->long_name, \"cumulative\")) {\nf8d10810d3 5077) if (arg)\nf8d10810d3 5079) arg = \"cumulative\";\nf8d10810d3 5080) } else if (!strcmp(opt->long_name, \"dirstat-by-file\"))\nf8d10810d3 5081) parse_dirstat_opt(options, \"files\");\nf8d10810d3 5082) parse_dirstat_opt(options, arg ? arg : \"\");\nf8d10810d3 5083) return 0;\n97e53999cd 5086) static int diff_opt_find_copies(const struct option *opt,\n97e53999cd 5089) struct diff_options *options = opt->value;\n97e53999cd 5091) BUG_ON_OPT_NEG(unset);\n97e53999cd 5092) if (!arg)\n97e53999cd 5093) arg = \"\";\n97e53999cd 5094) options->rename_score = parse_rename_score(&arg);\n97e53999cd 5095) if (*arg != 0)\n97e53999cd 5096) return error(_(\"invalid argument to %s\"), opt->long_name);\n97e53999cd 5098) if (options->detect_rename == DIFF_DETECT_COPY)\n97e53999cd 5099) options->flags.find_copies_harder = 1;\n97e53999cd 5101) options->detect_rename = DIFF_DETECT_COPY;\n97e53999cd 5103) return 0;\n10e07ecc0c 5116) return error(_(\"invalid argument to %s\"), opt->long_name);\nc2dcec4fd2 5122) static int diff_opt_follow(const struct option *opt,\nc2dcec4fd2 5125) struct diff_options *options = opt->value;\nc2dcec4fd2 5127) BUG_ON_OPT_ARG(arg);\nc2dcec4fd2 5128) if (unset) {\nc2dcec4fd2 5129) options->flags.follow_renames = 0;\nc2dcec4fd2 5130) options->flags.default_follow_renames = 0;\nc2dcec4fd2 5132) options->flags.follow_renames = 1;\nc2dcec4fd2 5134) return 0;\n6c0ec4f728 5150) static int diff_opt_line_prefix(const struct option *opt,\n6c0ec4f728 5153) struct diff_options *options = opt->value;\n6c0ec4f728 5155) BUG_ON_OPT_NEG(unset);\n6c0ec4f728 5156) options->line_prefix = optarg;\n6c0ec4f728 5157) options->line_prefix_length = strlen(options->line_prefix);\n6c0ec4f728 5158) graph_setup_line_prefix(options);\n6c0ec4f728 5159) return 0;\n059343267e 5162) static int diff_opt_no_prefix(const struct option *opt,\n059343267e 5165) struct diff_options *options = opt->value;\n059343267e 5167) BUG_ON_OPT_NEG(unset);\n059343267e 5168) BUG_ON_OPT_ARG(optarg);\n059343267e 5169) options->a_prefix = \"\";\n059343267e 5170) options->b_prefix = \"\";\n059343267e 5171) return 0;\n3d810d1860 5174) static enum parse_opt_result diff_opt_output(struct \nparse_opt_ctx_t *ctx,\n3d810d1860 5178) struct diff_options *options = opt->value;\n3d810d1860 5181) BUG_ON_OPT_NEG(unset);\n3d810d1860 5182) path = prefix_filename(ctx->prefix, arg);\n3d810d1860 5183) options->file = xfopen(path, \"w\");\n3d810d1860 5184) options->close_file = 1;\n3d810d1860 5185) if (options->use_color != GIT_COLOR_ALWAYS)\n3d810d1860 5186) options->use_color = GIT_COLOR_NEVER;\n3d810d1860 5187) free(path);\n3d810d1860 5188) return 0;\n2156b1fd0c 5191) static int diff_opt_patience(const struct option *opt,\n2156b1fd0c 5194) struct diff_options *options = opt->value;\n2156b1fd0c 5197) BUG_ON_OPT_NEG(unset);\n2156b1fd0c 5198) BUG_ON_OPT_ARG(arg);\n2156b1fd0c 5199) options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);\n2156b1fd0c 5205) for (i = 0; i < options->anchors_nr; i++)\n2156b1fd0c 5206) free(options->anchors[i]);\n2156b1fd0c 5207) options->anchors_nr = 0;\n2156b1fd0c 5208) return 0;\nd071ebcc8a 5211) static int diff_opt_pickaxe_regex(const struct option *opt,\nd071ebcc8a 5214) struct diff_options *options = opt->value;\nd071ebcc8a 5216) BUG_ON_OPT_NEG(unset);\nd071ebcc8a 5217) options->pickaxe = arg;\nd071ebcc8a 5218) options->pickaxe_opts |= DIFF_PICKAXE_KIND_G;\nd071ebcc8a 5219) return 0;\nd071ebcc8a 5222) static int diff_opt_pickaxe_string(const struct option \n*opt,\nd071ebcc8a 5225) struct diff_options *options = opt->value;\nd071ebcc8a 5227) BUG_ON_OPT_NEG(unset);\nd071ebcc8a 5228) options->pickaxe = arg;\nd071ebcc8a 5229) options->pickaxe_opts |= DIFF_PICKAXE_KIND_S;\nd071ebcc8a 5230) return 0;\n350a71f2fc 5233) static int diff_opt_relative(const struct option *opt,\n350a71f2fc 5236) struct diff_options *options = opt->value;\n350a71f2fc 5238) BUG_ON_OPT_NEG(unset);\n350a71f2fc 5239) options->flags.relative_name = 1;\n350a71f2fc 5240) if (arg)\n350a71f2fc 5241) options->prefix = arg;\n350a71f2fc 5242) return 0;\n1d2890f4f5 5245) static int diff_opt_submodule(const struct option *opt,\n1d2890f4f5 5248) struct diff_options *options = opt->value;\n1d2890f4f5 5250) BUG_ON_OPT_NEG(unset);\n1d2890f4f5 5251) if (!arg)\n1d2890f4f5 5252) arg = \"log\";\n1d2890f4f5 5253) if (parse_submodule_params(options, arg))\n1d2890f4f5 5254) return error(_(\"failed to parse --submodule option \nparameter: '%s'\"),\n1d2890f4f5 5256) return 0;\n1d85988346 5259) static int diff_opt_textconv(const struct option *opt,\n1d85988346 5262) struct diff_options *options = opt->value;\n1d85988346 5264) BUG_ON_OPT_ARG(arg);\n1d85988346 5265) if (unset) {\n1d85988346 5266) options->flags.allow_textconv = 0;\n1d85988346 5268) options->flags.allow_textconv = 1;\n1d85988346 5269) options->flags.textconv_set_via_cmdline = 1;\n1d85988346 5271) return 0;\n6643eb7bbf 5284) return error(_(\"%s expects a numerical value\"), \n\"--unified\");\n08d080bf7f 5290) static int diff_opt_word_diff(const struct option *opt,\n08d080bf7f 5293) struct diff_options *options = opt->value;\n08d080bf7f 5295) BUG_ON_OPT_NEG(unset);\n08d080bf7f 5296) if (arg) {\n08d080bf7f 5308) return error(_(\"bad --word-diff argument: %s\"), arg);\n08d080bf7f 5313) return 0;\nafe77a4dd9 5316) static int diff_opt_word_diff_regex(const struct option \n*opt,\nafe77a4dd9 5319) struct diff_options *options = opt->value;\nafe77a4dd9 5321) BUG_ON_OPT_NEG(unset);\nafe77a4dd9 5322) if (options->word_diff == DIFF_WORDS_NONE)\nafe77a4dd9 5323) options->word_diff = DIFF_WORDS_PLAIN;\nafe77a4dd9 5324) options->word_regex = arg;\nafe77a4dd9 5325) return 0;\n\nfsck.c\nef644c4150  252) oidset_parse_file(&options->skiplist, buf + equal + 1);\n\nident.c\n97f56073ce 568) static void set_env_if(const char *key, const char \n*value, int *given, int bit)\n97f56073ce 570) if ((*given & bit) || getenv(key))\n97f56073ce 571) return; /* nothing to do */\n97f56073ce 572) setenv(key, value, 0);\n97f56073ce 573) *given |= bit;\n97f56073ce 576) void prepare_fallback_ident(const char *name, const char \n*email)\n97f56073ce 578) set_env_if(\"GIT_AUTHOR_NAME\", name,\n97f56073ce 580) set_env_if(\"GIT_AUTHOR_EMAIL\", email,\n97f56073ce 582) set_env_if(\"GIT_COMMITTER_NAME\", name,\n97f56073ce 584) set_env_if(\"GIT_COMMITTER_EMAIL\", email,\n97f56073ce 586) }\n\nlist-objects-filter-options.c\n3a7a698e93  74) if (!get_oid_with_context(the_repository, v0, GET_OID_BLOB,\n\nlist-objects.c\n4f6d26b167 229) static void add_edge_parents(struct commit *commit,\n4f6d26b167 236) for (parents = commit->parents; parents; parents = \nparents->next) {\n4f6d26b167 237) struct commit *parent = parents->item;\n4f6d26b167 238) struct tree *tree = get_commit_tree(parent);\n4f6d26b167 240) if (!tree)\n4f6d26b167 241) continue;\n4f6d26b167 243) oidset_insert(set, &tree->object.oid);\n4f6d26b167 245) if (!(parent->object.flags & UNINTERESTING))\n4f6d26b167 246) continue;\n4f6d26b167 247) tree->object.flags |= UNINTERESTING;\n4f6d26b167 249) if (revs->edge_hint && !(parent->object.flags & SHOWN)) {\n4f6d26b167 250) parent->object.flags |= SHOWN;\n4f6d26b167 251) show_edge(parent);\n4f6d26b167 254) }\n4f6d26b167 265) oidset_init(&set, 16);\n4f6d26b167 267) for (list = revs->commits; list; list = list->next) {\n4f6d26b167 268) struct commit *commit = list->item;\n4f6d26b167 269) struct tree *tree = get_commit_tree(commit);\n4f6d26b167 271) if (commit->object.flags & UNINTERESTING)\n4f6d26b167 272) tree->object.flags |= UNINTERESTING;\n4f6d26b167 274) oidset_insert(&set, &tree->object.oid);\n4f6d26b167 275) add_edge_parents(commit, revs, show_edge, &set);\n4f6d26b167 278) mark_trees_uninteresting_sparse(revs->repo, &set);\n4f6d26b167 279) oidset_clear(&set);\n4f6d26b167 287) commit->object.flags |= SHOWN;\n4f6d26b167 288) show_edge(commit);\n\nmerge-recursive.c\nd7cf3a96e9  149) static struct tree *shift_tree_object(struct repository \n*repo,\nd7cf3a96e9  163) return lookup_tree(repo, &shifted);\n0d6caa2d08  428) struct index_state *istate = o->repo->index;\n0d6caa2d08  430) if (unmerged_index(istate)) {\n0d6caa2d08  433) for (i = 0; i < istate->cache_nr; i++) {\n0d6caa2d08  434) const struct cache_entry *ce = istate->cache[i];\n0d6caa2d08  442) if (!istate->cache_tree)\n0d6caa2d08  443) istate->cache_tree = cache_tree();\n0d6caa2d08  445) if (!cache_tree_fully_valid(istate->cache_tree) &&\n0d6caa2d08  446)     cache_tree_update(istate, 0) < 0) {\nd7cf3a96e9  451) result = lookup_tree(o->repo, &istate->cache_tree->oid);\n0d6caa2d08  733) ce = index_file_exists(o->repo->index, path, strlen(path),\n0d6caa2d08 1116) static int find_first_merges(struct repository *repo,\n0d6caa2d08 1137) repo_init_revisions(repo, &revs, NULL);\nd7cf3a96e9 1215) if (!(commit_base = lookup_commit_reference(o->repo, \nbase)) ||\nd7cf3a96e9 1216)     !(commit_a = lookup_commit_reference(o->repo, a)) ||\nd7cf3a96e9 1217)     !(commit_b = lookup_commit_reference(o->repo, b))) {\n0d6caa2d08 1267) parent_count = find_first_merges(o->repo, &merges, path,\n0d6caa2d08 1416) if (!o->call_depth && would_lose_untracked(o, \ndest->path)) {\n0d6caa2d08 1455)     (!o->call_depth && would_lose_untracked(o, path))) {\n0d6caa2d08 1465) ret = remove_file_from_index(o->repo->index, path);\n0d6caa2d08 1541) return remove_file_from_index(o->repo->index, dest->path);\n0d6caa2d08 1622)     o->call_depth || would_lose_untracked(o, prev_path1));\n0d6caa2d08 1625)     o->call_depth || would_lose_untracked(o, prev_path2));\n0d6caa2d08 1732) if (dir_in_way(o->repo->index, path, !o->call_depth, 0)) {\n0d6caa2d08 1737) } else if (would_lose_untracked(o, path)) {\n0d6caa2d08 1798) remove_file_from_index(o->repo->index, a->path);\n0d6caa2d08 1805) remove_file_from_index(o->repo->index, b->path);\n0d6caa2d08 3057) if (renormalize_buffer(opt->repo->index, path, o.buf, \no.len, &o) |\n0d6caa2d08 3058)     renormalize_buffer(opt->repo->index, path, a.buf, \na.len, &a))\n0d6caa2d08 3139) if (dir_in_way(o->repo->index, path, !o->call_depth,\n0d6caa2d08 3173) pos = index_name_pos(o->repo->index, path, strlen(path));\n0d6caa2d08 3174) ce = o->repo->index->cache[pos];\n0d6caa2d08 3193) remove_file_from_index(o->repo->index, path);\n0d6caa2d08 3364) remove_file_from_index(o->repo->index, path);\nd7cf3a96e9 3423) merge = shift_tree_object(o->repo, head, merge, \no->subtree_shift);\nd7cf3a96e9 3424) common = shift_tree_object(o->repo, head, common, \no->subtree_shift);\nd7cf3a96e9 3560) tree = lookup_tree(o->repo, \no->repo->hash_algo->empty_tree);\nd7cf3a96e9 3561) merged_common_ancestors = make_virtual_commit(o->repo, \ntree, \"ancestor\");\n0d6caa2d08 3575) discard_index(o->repo->index);\nd7cf3a96e9 3605) *result = make_virtual_commit(o->repo, mrtree, \"merged \ntree\");\n\nmerge.c\ne1ff0a32e4  40) if (repo_read_index(r) < 0)\n\nnotes-merge.c\n1d18d7581c 652) create_notes_commit(o->repo, local_tree, parents, \no->commit_msg.buf,\n1d18d7581c 727) create_notes_commit(o->repo, partial_tree, \npartial_commit->parents, msg,\n\nnotes-utils.c\n1d18d7581c   8) void create_notes_commit(struct repository *r,\n1d18d7581c  25) struct commit *parent = lookup_commit(r, &parent_oid);\n1d18d7581c  38) void commit_notes(struct repository *r, struct \nnotes_tree *t, const char *msg)\n1d18d7581c  54) create_notes_commit(r, t, NULL, buf.buf, buf.len, \n&commit_oid);\n1d18d7581c 175) void finish_copy_notes_for_rewrite(struct repository *r,\n1d18d7581c 181) commit_notes(r, c->trees[i], msg);\n\noidset.c\nef644c4150 39) void oidset_parse_file(struct oidset *set, const char *path)\nef644c4150 42) struct strbuf sb = STRBUF_INIT;\nef644c4150 45) fp = fopen(path, \"r\");\nef644c4150 46) if (!fp)\nef644c4150 47) die(\"Could not open skip list: %s\", path);\nef644c4150 48) while (!strbuf_getline(&sb, fp)) {\nef644c4150 57) hash = strchr(sb.buf, '#');\nef644c4150 58) if (hash)\nef644c4150 59) strbuf_setlen(&sb, hash - sb.buf);\nef644c4150 60) strbuf_trim(&sb);\nef644c4150 61) if (!sb.len)\nef644c4150 62) continue;\nef644c4150 64) if (parse_oid_hex(sb.buf, &oid, &p) || *p != '\\0')\nef644c4150 65) die(\"Invalid SHA-1: %s\", sb.buf);\nef644c4150 66) oidset_insert(set, &oid);\nef644c4150 68) if (ferror(fp))\nef644c4150 69) die_errno(\"Could not read '%s'\", path);\nef644c4150 70) fclose(fp);\nef644c4150 71) strbuf_release(&sb);\nef644c4150 72) }\n\nparse-options-cb.c\n8fc6b47cd5  26) v = the_hash_algo->hexsz;\n08339886b9 173) enum parse_opt_result parse_opt_unknown_cb(struct \nparse_opt_ctx_t *ctx,\n9b4ae5190a 177) BUG_ON_OPT_ARG(arg);\n08339886b9 178) return PARSE_OPT_UNKNOWN;\n\nparse-options.c\n08339886b9  48) static enum parse_opt_result opt_command_mode_error(\n08339886b9  74) return PARSE_OPT_ERROR;\n9b4ae5190a 183) return (*opt->ll_callback)(p, opt, p_arg, p_unset);\n9b4ae5190a 255) rc = (*numopt->ll_callback)(p, numopt, arg, 0);\n\npretty.c\n4681fe38e1 1060) static int match_placeholder_arg_value(const char \n*to_parse, const char *candidate,\n4681fe38e1 1067) if (valuestart) {\n4681fe38e1 1068) if (*p != '=')\n4681fe38e1 1069) return 0;\n4681fe38e1 1070) *valuestart = p + 1;\n4681fe38e1 1071) *valuelen = strcspn(*valuestart, \",)\");\n4681fe38e1 1072) p = *valuestart + *valuelen;\n4681fe38e1 1085) static int match_placeholder_arg(const char *to_parse, \nconst char *candidate,\n4681fe38e1 1088) return match_placeholder_arg_value(to_parse, candidate, \nend, NULL, NULL);\nb755bf6f83 1091) static int match_placeholder_bool_arg(const char \n*to_parse, const char *candidate,\nb755bf6f83 1095) if (!skip_prefix(to_parse, candidate, &p))\nb755bf6f83 1096) return 0;\nb755bf6f83 1098) if (match_placeholder_arg(p, \"=no\", end) ||\nb755bf6f83 1099)     match_placeholder_arg(p, \"=off\", end) ||\nb755bf6f83 1100)     match_placeholder_arg(p, \"=false\", end)) {\nb755bf6f83 1101) *val = 0;\nb755bf6f83 1102) return 1;\nb755bf6f83 1105) if (match_placeholder_arg(p, \"\", end) ||\nb755bf6f83 1106)     match_placeholder_arg(p, \"=yes\", end) ||\nb755bf6f83 1107)     match_placeholder_arg(p, \"=on\", end) ||\nb755bf6f83 1108)     match_placeholder_arg(p, \"=true\", end)) {\nb755bf6f83 1109) *val = 1;\nb755bf6f83 1110) return 1;\n4681fe38e1 1112) return 0;\n4681fe38e1 1115) static int format_trailer_match_cb(const struct strbuf \n*key, void *ud)\n4681fe38e1 1117) const struct string_list *list = ud;\n4681fe38e1 1120) for_each_string_list_item (item, list) {\n4681fe38e1 1121) if (key->len == (uintptr_t)item->util &&\n4681fe38e1 1122)     !strncasecmp (item->string, key->buf, key->len))\n4681fe38e1 1123) return 1;\nb755bf6f83 1125) return 0;\n18f8e81091 1143) return res;\n4681fe38e1 1369) struct string_list filter_list = STRING_LIST_INIT_NODUP;\nced45aab72 1370) struct strbuf sepbuf = STRBUF_INIT;\nffd7cae405 1371) size_t ret = 0;\n4681fe38e1 1381) if (match_placeholder_arg_value(arg, \"key\", &arg, \n&argval, &arglen)) {\n4681fe38e1 1382) uintptr_t len = arglen;\n4681fe38e1 1383) if (len && argval[len - 1] == ':')\n4681fe38e1 1384) len--;\n4681fe38e1 1385) string_list_append(&filter_list, argval)->util = (char \n*)len;\n4681fe38e1 1387) opts.filter = format_trailer_match_cb;\n4681fe38e1 1388) opts.filter_data = &filter_list;\nced45aab72 1390) } else if (match_placeholder_arg_value(arg, \n\"separator\", &arg, &argval, &arglen)) {\nced45aab72 1393) strbuf_reset(&sepbuf);\nced45aab72 1394) fmt = xstrndup(argval, arglen);\nced45aab72 1395) strbuf_expand(&sepbuf, fmt, strbuf_expand_literal_cb, \nNULL);\nced45aab72 1396) free(fmt);\nced45aab72 1397) opts.separator = &sepbuf;\n4681fe38e1 1398) } else if (!match_placeholder_bool_arg(arg, \"only\", \n&arg, &opts.only_trailers) &&\ne9da5de761 1399)    !match_placeholder_bool_arg(arg, \"unfold\", &arg, \n&opts.unfold) &&\ne9da5de761 1400)    !match_placeholder_bool_arg(arg, \"valueonly\", &arg, \n&opts.value_only))\nffd7cae405 1406) ret = arg - placeholder + 1;\n4681fe38e1 1408) string_list_clear (&filter_list, 0);\nced45aab72 1409) strbuf_release(&sepbuf);\nffd7cae405 1410) return ret;\n\nprotocol.c\n6da1f1a920  31) return protocol_v0_string;\n6da1f1a920  33) return protocol_v1_string;\n6da1f1a920  37) die(_(\"Unrecognized protocol version\"));\n6da1f1a920  39) die(_(\"Unrecognized protocol_version\"));\n6da1f1a920  76) return;\n6da1f1a920 112) ALLOC_ARRAY(tmp_allowed_versions, tmp_nr);\n6da1f1a920 113) copy_array(tmp_allowed_versions, allowed_versions, tmp_nr,\n6da1f1a920 122) for (i = 1; i < nr_allowed_versions; i++)\n6da1f1a920 123) if (tmp_allowed_versions[i] == config_version) {\n6da1f1a920 124) SWAP(tmp_allowed_versions[0],\n6da1f1a920 131) strbuf_addf(advert, \":version=%s\",\n6da1f1a920 132) format_protocol_version(tmp_allowed_versions[i]));\n\nrebase-interactive.c\nc27b32f0ec  15) static enum missing_commit_check_level \nget_missing_commit_check_level(void)\nc27b32f0ec  19) if (git_config_get_value(\"rebase.missingcommitscheck\", \n&value) ||\nc27b32f0ec  20) !strcasecmp(\"ignore\", value))\nc27b32f0ec  21) return MISSING_COMMIT_CHECK_IGNORE;\nc27b32f0ec  22) if (!strcasecmp(\"warn\", value))\nc27b32f0ec  23) return MISSING_COMMIT_CHECK_WARN;\nc27b32f0ec  24) if (!strcasecmp(\"error\", value))\nc27b32f0ec  25) return MISSING_COMMIT_CHECK_ERROR;\nc27b32f0ec  26) warning(_(\"unrecognized setting %s for option \"\nc27b32f0ec  28) return MISSING_COMMIT_CHECK_IGNORE;\n2dd989a694  31) void append_todo_help(unsigned keep_empty, int \ncommand_count,\n2dd989a694  52) unsigned edit_todo = !(shortrevisions && shortonto);\n2dd989a694  54) if (!edit_todo) {\n2dd989a694  55) strbuf_addch(buf, '\\n');\n2dd989a694  56) strbuf_commented_addf(buf, Q_(\"Rebase %s onto %s (%d \ncommand)\",\ne5b1c9d929  90) int edit_todo_list(struct repository *r, struct \ntodo_list *todo_list,\ne5b1c9d929  95) unsigned initial = shortrevisions && shortonto;\ne5b1c9d929  97) if (initial) {\ne5b1c9d929  98) todo_list_write_to_file(r, todo_list, todo_file, \nshortrevisions, shortonto,\ne5b1c9d929 101) if (copy_file(rebase_path_todo_backup(), todo_file, 0666))\ne5b1c9d929 102) return error(_(\"could not copy '%s' to '%s'.\"), todo_file,\ne5b1c9d929 105) todo_list_parse_insn_buffer(r, todo_list->buf.buf, \ntodo_list);\ne5b1c9d929 106) todo_list_write_to_file(r, todo_list, todo_file, NULL, \nNULL, -1,\ne5b1c9d929 110) if (launch_sequence_editor(todo_file, &new_todo->buf, NULL))\ne5b1c9d929 111) return -2;\ne5b1c9d929 113) strbuf_stripspace(&new_todo->buf, 1);\ne5b1c9d929 114) if (initial && new_todo->buf.len == 0)\ne5b1c9d929 115) return -3;\ne5b1c9d929 117) if (!initial)\ne5b1c9d929 118) todo_list_parse_insn_buffer(r, new_todo->buf.buf, new_todo);\ne5b1c9d929 120) return 0;\nc27b32f0ec 123) define_commit_slab(commit_seen, unsigned char);\nc27b32f0ec 130) int todo_list_check(struct todo_list *old_todo, struct \ntodo_list *new_todo)\nc27b32f0ec 132) enum missing_commit_check_level check_level = \nget_missing_commit_check_level();\nc27b32f0ec 133) struct strbuf missing = STRBUF_INIT;\nc27b32f0ec 134) int res = 0, i;\nc27b32f0ec 137) init_commit_seen(&commit_seen);\nc27b32f0ec 139) if (check_level == MISSING_COMMIT_CHECK_IGNORE)\nc27b32f0ec 140) goto leave_check;\nc27b32f0ec 143) for (i = 0; i < new_todo->nr; i++) {\nc27b32f0ec 144) struct commit *commit = new_todo->items[i].commit;\nc27b32f0ec 145) if (commit)\nc27b32f0ec 146) *commit_seen_at(&commit_seen, commit) = 1;\nc27b32f0ec 150) for (i = old_todo->nr - 1; i >= 0; i--) {\nc27b32f0ec 151) struct todo_item *item = old_todo->items + i;\nc27b32f0ec 152) struct commit *commit = item->commit;\nc27b32f0ec 153) if (commit && !*commit_seen_at(&commit_seen, commit)) {\nc27b32f0ec 154) strbuf_addf(&missing, \" - %s %.*s\\n\",\nc27b32f0ec 155) find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV),\nc27b32f0ec 157)     old_todo->buf.buf + item->arg_offset);\nc27b32f0ec 158) *commit_seen_at(&commit_seen, commit) = 1;\nc27b32f0ec 163) if (!missing.len)\nc27b32f0ec 164) goto leave_check;\nc27b32f0ec 166) if (check_level == MISSING_COMMIT_CHECK_ERROR)\nc27b32f0ec 167) res = 1;\nc27b32f0ec 169) fprintf(stderr,\nc27b32f0ec 174) fputs(missing.buf, stderr);\nc27b32f0ec 175) strbuf_release(&missing);\nc27b32f0ec 177) fprintf(stderr, _(\"To avoid this message, use \\\"drop\\\" to \"\nc27b32f0ec 184) clear_commit_seen(&commit_seen);\nc27b32f0ec 185) return res;\n\nremote-curl.c\n6da1f1a920  344) return 0;\n34a9469d6a  363) return;\n34a9469d6a  373) die(\"invalid server response; expected service, got \nflush packet\");\n240fb9b7a0  392) } else if (!strcmp(line, \"version 2\")) {\n34a9469d6a  397) d->proto_git = 1;\ne586e7df7c  399) } else if (skip_prefix(line, \"ERR \", &p)) {\ne586e7df7c  400) die(_(\"remote error: %s\"), p);\n\nrepository.c\nrerere.c\ne1ff0a32e4  598) if (repo_read_index(r) < 0)\n3a95f31d1c  708) repo_hold_locked_index(r, &index_lock, LOCK_DIE_ON_ERROR);\ne1ff0a32e4 1110) if (repo_read_index(r) < 0)\n\nrevision.c\nd5d2e93577  109) static int path_and_oids_cmp(const void \n*hashmap_cmp_fn_data,\nd5d2e93577  114) return strcmp(e1->path, e2->path);\nd5d2e93577  117) static void paths_and_oids_init(struct hashmap *map)\nd5d2e93577  119) hashmap_init(map, (hashmap_cmp_fn) path_and_oids_cmp, \nNULL, 0);\nd5d2e93577  120) }\nd5d2e93577  122) static void paths_and_oids_clear(struct hashmap *map)\nd5d2e93577  126) hashmap_iter_init(map, &iter);\nd5d2e93577  128) while ((entry = (struct path_and_oids_entry \n*)hashmap_iter_next(&iter))) {\nd5d2e93577  129) oidset_clear(&entry->trees);\nd5d2e93577  130) free(entry->path);\nd5d2e93577  133) hashmap_free(map, 1);\nd5d2e93577  134) }\nd5d2e93577  136) static void paths_and_oids_insert(struct hashmap *map,\nd5d2e93577  140) int hash = strhash(path);\nd5d2e93577  144) hashmap_entry_init(&key, hash);\nd5d2e93577  147) key.path = (char *)path;\nd5d2e93577  148) oidset_init(&key.trees, 0);\nd5d2e93577  150) if (!(entry = (struct path_and_oids_entry \n*)hashmap_get(map, &key, NULL))) {\nd5d2e93577  151) entry = xcalloc(1, sizeof(struct path_and_oids_entry));\nd5d2e93577  152) hashmap_entry_init(entry, hash);\nd5d2e93577  153) entry->path = xstrdup(key.path);\nd5d2e93577  154) oidset_init(&entry->trees, 16);\nd5d2e93577  155) hashmap_put(map, entry);\nd5d2e93577  158) oidset_insert(&entry->trees, oid);\nd5d2e93577  159) }\nd5d2e93577  161) static void add_children_by_path(struct repository *r,\nd5d2e93577  168) if (!tree)\nd5d2e93577  169) return;\nd5d2e93577  171) if (parse_tree_gently(tree, 1) < 0)\nd5d2e93577  172) return;\nd5d2e93577  174) init_tree_desc(&desc, tree->buffer, tree->size);\nd5d2e93577  175) while (tree_entry(&desc, &entry)) {\nd5d2e93577  176) switch (object_type(entry.mode)) {\n5dde8fc6df  178) paths_and_oids_insert(map, entry.path, &entry.oid);\nd5d2e93577  180) if (tree->object.flags & UNINTERESTING) {\n5dde8fc6df  181) struct tree *child = lookup_tree(r, &entry.oid);\nd5d2e93577  182) if (child)\nd5d2e93577  183) child->object.flags |= UNINTERESTING;\nd5d2e93577  185) break;\nd5d2e93577  187) if (tree->object.flags & UNINTERESTING) {\n5dde8fc6df  188) struct blob *child = lookup_blob(r, &entry.oid);\nd5d2e93577  189) if (child)\nd5d2e93577  190) child->object.flags |= UNINTERESTING;\nd5d2e93577  192) break;\nd5d2e93577  195) break;\nd5d2e93577  199) free_tree_buffer(tree);\nf1f5de442f  202) void mark_trees_uninteresting_sparse(struct repository *r,\nd5d2e93577  205) unsigned has_interesting = 0, has_uninteresting = 0;\nf1f5de442f  212) oidset_iter_init(trees, &iter);\nd5d2e93577  213) while ((!has_interesting || !has_uninteresting) &&\nf1f5de442f  215) struct tree *tree = lookup_tree(r, oid);\nf1f5de442f  217) if (!tree)\nf1f5de442f  218) continue;\nd5d2e93577  220) if (tree->object.flags & UNINTERESTING)\nd5d2e93577  221) has_uninteresting = 1;\nd5d2e93577  223) has_interesting = 1;\nd5d2e93577  227) if (!has_uninteresting || !has_interesting)\nd5d2e93577  228) return;\nd5d2e93577  230) paths_and_oids_init(&map);\nd5d2e93577  232) oidset_iter_init(trees, &iter);\nd5d2e93577  233) while ((oid = oidset_iter_next(&iter))) {\nd5d2e93577  234) struct tree *tree = lookup_tree(r, oid);\nd5d2e93577  235) add_children_by_path(r, tree, &map);\nd5d2e93577  238) hashmap_iter_init(&map, &map_iter);\nd5d2e93577  239) while ((entry = hashmap_iter_next(&map_iter)))\nd5d2e93577  240) mark_trees_uninteresting_sparse(r, &entry->trees);\nd5d2e93577  242) paths_and_oids_clear(&map);\ne1ff0a32e4 1690) repo_read_index(revs->repo);\n3a7a698e93 1749) if (get_oid_with_context(revs->repo, a_name, oc_flags, \n&a_oid, a_oc) ||\n3a7a698e93 1750)     get_oid_with_context(revs->repo, b_name, oc_flags, \n&b_oid, b_oc))\n\nsequencer.c\ne5b1c9d929   58) GIT_PATH_FUNC(rebase_path_todo_backup, \n\"rebase-merge/git-rebase-todo.backup\")\ne1ff0a32e4  449) static int error_dirty_index(struct repository *repo, \nstruct replay_opts *opts)\ne1ff0a32e4  451) if (repo_read_index_unmerged(repo))\ne1ff0a32e4  486) repo_read_index(r);\n1d18d7581c 1118) void commit_post_rewrite(struct repository *r,\n1d18d7581c 1128) finish_copy_notes_for_rewrite(r, cfg, \"Notes added by \n'git commit --amend'\");\n1d18d7581c 1409) commit_post_rewrite(r, current_head, oid);\ne1ff0a32e4 1745) return error_dirty_index(r, opts);\n5d94d54564 1996) void todo_list_release(struct todo_list *todo_list)\nd836079ec2 2024) item->arg_offset = bol - buf;\nd836079ec2 2051) item->arg_offset = bol - buf;\nd836079ec2 2063) item->arg_offset = bol - buf;\nd836079ec2 2077) item->arg_offset = bol - buf;\nd836079ec2 2089) bol = end_of_object_name + strspn(end_of_object_name, \" \n\\t\");\nd836079ec2 2090) item->arg_offset = bol - buf;\nd836079ec2 2091) item->arg_len = (int)(eol - bol);\n5d94d54564 2100) int todo_list_parse_insn_buffer(struct repository *r, \nchar *buf,\n2b71595d47 2107) todo_list->current = todo_list->nr = 0;\nd836079ec2 2119) if (parse_insn_line(r, item, buf, p, eol)) {\n2b71595d47 2122) item->command = TODO_COMMENT + 1;\nd836079ec2 2123) item->arg_offset = p - buf;\n2b71595d47 2124) item->arg_len = (int)(eol - p);\n2b71595d47 2125) item->commit = NULL;\n5d94d54564 2200) res = todo_list_parse_insn_buffer(r, \ntodo_list->buf.buf, todo_list);\n5d94d54564 2231)     !todo_list_parse_insn_buffer(r, done.buf.buf, &done))\nd836079ec2 2468) item->arg_offset = 0;\ne1ff0a32e4 2829) if (discard_index(r->index) < 0 || repo_read_index(r) < 0)\n3a95f31d1c 2953) if (repo_hold_locked_index(r, &lock, \nLOCK_REPORT_ON_ERROR) < 0)\ne1ff0a32e4 2998) if (repo_read_index_unmerged(r)) {\n3a95f31d1c 3071) if (repo_hold_locked_index(r, &lock, \nLOCK_REPORT_ON_ERROR) < 0) {\ne1ff0a32e4 3252)      repo_read_index(r) < 0))\ne1ff0a32e4 3274) repo_read_index(r);\n0d6caa2d08 3275) init_merge_options(&o, r);\nd836079ec2 3507) const char *arg = todo_list->buf.buf + item->arg_offset;\nd836079ec2 3595) char *end_of_arg = (char *)(arg + item->arg_len);\nd836079ec2 3600) res = do_exec(r, arg);\nd836079ec2 3618) if ((res = do_label(r, arg, item->arg_len)))\nd836079ec2 3621) if ((res = do_reset(r, arg, item->arg_len, opts)))\ne1ff0a32e4 3950) res = error_dirty_index(r, opts);\n0566a4f68e 4372) strbuf_addf(out, \"%s onto\\n\", cmd_label);\n0566a4f68e 4382) strbuf_addf(out, \"\\n%c Branch %s\\n\", comment_line_char, \nentry->string);\n0566a4f68e 4384) strbuf_addch(out, '\\n');\n0566a4f68e 4397) strbuf_addf(out, \"%s %s\\n\", cmd_reset,\n0566a4f68e 4411) strbuf_addf(out, \"%s onto\\n\", cmd_reset);\n0566a4f68e 4415) strbuf_addf(out, \"%s %s # %s\\n\",\n0566a4f68e 4425) strbuf_addf(out, \"%s\\n\", entry->string);\n0566a4f68e 4428) strbuf_addf(out, \"%s %s\\n\",\n0566a4f68e 4429)     cmd_label, entry->string);\n0566a4f68e 4451) int sequencer_make_script(struct repository *r, struct \nstrbuf *out, int argc,\n0566a4f68e 4499) strbuf_addf(out, \"%c \", comment_line_char);\n0566a4f68e 4500) strbuf_addf(out, \"%s %s \", insn,\n0566a4f68e 4502) pretty_print_commit(&pp, commit, out);\n0566a4f68e 4503) strbuf_addch(out, '\\n');\n8414c890aa 4508) static void todo_list_add_exec_commands(struct \ntodo_list *todo_list,\n8414c890aa 4511) struct strbuf *buf = &todo_list->buf;\n8414c890aa 4512) size_t base_offset = buf->len;\n8414c890aa 4513) int i, insert, nr = 0, alloc = 0;\n8414c890aa 4514) struct todo_item *items = NULL, *base_items = NULL;\n8414c890aa 4516) base_items = xcalloc(commands->nr, sizeof(struct \ntodo_item));\n8414c890aa 4517) for (i = 0; i < commands->nr; ++i) {\n8414c890aa 4518) size_t command_len = strlen(commands->items[i].string);\n8414c890aa 4520) strbuf_addstr(buf, commands->items[i].string);\n8414c890aa 4521) strbuf_addch(buf, '\\n');\n8414c890aa 4523) base_items[i].command = TODO_EXEC;\n8414c890aa 4524) base_items[i].offset_in_buf = base_offset;\n8414c890aa 4525) base_items[i].arg_offset = base_offset + strlen(\"exec \");\n8414c890aa 4526) base_items[i].arg_len = command_len - strlen(\"exec \");\n8414c890aa 4528) base_offset += command_len + 1;\n8414c890aa 4537) for (i = 0; i < todo_list->nr; i++) {\n8414c890aa 4538) enum todo_command command = todo_list->items[i].command;\n8414c890aa 4539) if (insert >= 0 && command != TODO_COMMENT && \n!is_fixup(command)) {\n8414c890aa 4540) ALLOC_GROW(items, nr + commands->nr, alloc);\n8414c890aa 4541) COPY_ARRAY(items + nr, base_items, commands->nr);\n8414c890aa 4542) nr += commands->nr;\n8414c890aa 4546) ALLOC_GROW(items, nr + 1, alloc);\n8414c890aa 4547) items[nr++] = todo_list->items[i];\n8414c890aa 4549) if (command == TODO_PICK || command == TODO_MERGE || \nis_fixup(command))\n8414c890aa 4554) if (insert >= 0 || nr == todo_list->nr) {\n8414c890aa 4555) ALLOC_GROW(items, nr + commands->nr, alloc);\n8414c890aa 4556) COPY_ARRAY(items + nr, base_items, commands->nr);\n8414c890aa 4557) nr += commands->nr;\n8414c890aa 4560) free(base_items);\n8414c890aa 4561) FREE_AND_NULL(todo_list->items);\n8414c890aa 4562) todo_list->items = items;\n8414c890aa 4563) todo_list->nr = nr;\n8414c890aa 4564) todo_list->alloc = alloc;\n8414c890aa 4571) int sequencer_add_exec_commands(struct repository *r,\n8414c890aa 4579) return error_errno(_(\"could not read '%s'.\"), todo_file);\n8414c890aa 4581) if (todo_list_parse_insn_buffer(r, todo_list.buf.buf, \n&todo_list)) {\n8414c890aa 4586) todo_list_add_exec_commands(&todo_list, commands);\n8414c890aa 4587) res = todo_list_write_to_file(r, &todo_list, todo_file, \nNULL, NULL, -1, 0);\n0cce4a2756 4588) todo_list_release(&todo_list);\n8414c890aa 4590) if (res)\n8414c890aa 4591) return error_errno(_(\"could not write '%s'.\"), todo_file);\n8414c890aa 4592) return 0;\ncf18b3f6c9 4595) static void todo_list_to_strbuf(struct repository *r, \nstruct todo_list *todo_list,\ncf18b3f6c9 4599) int i, max = todo_list->nr;\ncf18b3f6c9 4601) if (num > 0 && num < max)\ncf18b3f6c9 4602) max = num;\ncf18b3f6c9 4604) for (item = todo_list->items, i = 0; i < max; i++, \nitem++) {\ncf18b3f6c9 4607) strbuf_addf(buf, \"%.*s\\n\", item->arg_len,\n3ebafef416 4608)     todo_list->buf.buf + item->arg_offset);\ncf18b3f6c9 4614) strbuf_addch(buf, command_to_char(item->command));\ncf18b3f6c9 4616) strbuf_addstr(buf, command_to_string(item->command));\ncf18b3f6c9 4626) strbuf_addstr(buf, \" -c\");\ncf18b3f6c9 4628) strbuf_addstr(buf, \" -C\");\ncf18b3f6c9 4631) strbuf_addf(buf, \" %s\", oid);\ncf18b3f6c9 4636) strbuf_addch(buf, '\\n');\ncf18b3f6c9 4638) strbuf_addf(buf, \" %.*s\\n\", item->arg_len,\n3ebafef416 4639)     todo_list->buf.buf + item->arg_offset);\ncf18b3f6c9 4643) int todo_list_write_to_file(struct repository *r, \nstruct todo_list *todo_list,\ncf18b3f6c9 4648) struct strbuf buf = STRBUF_INIT;\ncf18b3f6c9 4650) todo_list_to_strbuf(r, todo_list, &buf, num, flags);\n2dd989a694 4651) if (flags & TODO_LIST_APPEND_TODO_HELP)\n2dd989a694 4652) append_todo_help(flags & TODO_LIST_KEEP_EMPTY, \ncount_commands(todo_list),\ncf18b3f6c9 4655) res = write_message(buf.buf, buf.len, file, 0);\n3ebafef416 4656) strbuf_release(&buf);\ncf18b3f6c9 4658) return res;\nc27b32f0ec 4667) int check_todo_list_from_file(struct repository *r)\nc27b32f0ec 4669) struct todo_list old_todo = TODO_LIST_INIT, new_todo = \nTODO_LIST_INIT;\nc27b32f0ec 4670) int res = 0;\nc27b32f0ec 4672) if (strbuf_read_file_or_whine(&new_todo.buf, \nrebase_path_todo()) < 0) {\n878056005e 4673) res = -1;\nc27b32f0ec 4674) goto out;\nc27b32f0ec 4677) if (strbuf_read_file_or_whine(&old_todo.buf, \nrebase_path_todo_backup()) < 0) {\nc27b32f0ec 4679) goto out;\nc27b32f0ec 4682) res = todo_list_parse_insn_buffer(r, old_todo.buf.buf, \n&old_todo);\nc27b32f0ec 4683) if (!res)\nc27b32f0ec 4684) res = todo_list_parse_insn_buffer(r, new_todo.buf.buf, \n&new_todo);\nc27b32f0ec 4685) if (!res)\nc27b32f0ec 4686) res = todo_list_check(&old_todo, &new_todo);\nc27b32f0ec 4687) if (res)\nc27b32f0ec 4688) fprintf(stderr, _(edit_todo_list_advice));\nc27b32f0ec 4690) todo_list_release(&old_todo);\nc27b32f0ec 4691) todo_list_release(&new_todo);\n98b29e0607 4697) static int skip_unnecessary_picks(struct repository *r,\n98b29e0607 4704) for (i = 0; i < todo_list->nr; i++) {\n98b29e0607 4705) struct todo_item *item = todo_list->items + i;\n98b29e0607 4727) if (todo_list_write_to_file(r, todo_list, done_path, \nNULL, NULL, i, 0)) {\n98b29e0607 4732) MOVE_ARRAY(todo_list->items, todo_list->items + i, \ntodo_list->nr - i);\n98b29e0607 4733) todo_list->nr -= i;\n98b29e0607 4734) todo_list->current = 0;\n98b29e0607 4736) if (is_fixup(peek_command(todo_list, 0)))\n98b29e0607 4737) record_in_rewritten(output_oid, peek_command(todo_list, \n0));\nc1c074e0cc 4751) struct todo_list new_todo = TODO_LIST_INIT;\nc1c074e0cc 4752) struct strbuf *buf = &todo_list->buf;\nc1c074e0cc 4759) if (buf->len == 0) {\nc1c074e0cc 4760) struct todo_item *item = append_new_todo(todo_list);\nc1c074e0cc 4761) item->command = TODO_NOOP;\nc1c074e0cc 4762) item->commit = NULL;\nc1c074e0cc 4763) item->arg_len = item->arg_offset = item->flags = \nitem->offset_in_buf = 0;\nc1c074e0cc 4766) if (autosquash && todo_list_rearrange_squash(todo_list))\n8414c890aa 4769) if (commands->nr)\nc1c074e0cc 4770) todo_list_add_exec_commands(todo_list, commands);\nc1c074e0cc 4772) if (count_commands(todo_list) == 0) {\n33bc1844f7 4779) res = edit_todo_list(r, todo_list, &new_todo, \nshortrevisions,\n33bc1844f7 4781) if (res == -1)\n33bc1844f7 4783) else if (res == -2) {\n33bc1844f7 4788) } else if (res == -3) {\nc1c074e0cc 4791) todo_list_release(&new_todo);\nc1c074e0cc 4796) if (todo_list_parse_insn_buffer(r, new_todo.buf.buf, \n&new_todo) ||\nc1c074e0cc 4797)     todo_list_check(todo_list, &new_todo)) {\nc1c074e0cc 4798) fprintf(stderr, _(edit_todo_list_advice));\nc1c074e0cc 4800) todo_list_release(&new_todo);\n98b29e0607 4805) if (opts->allow_ff && skip_unnecessary_picks(r, \n&new_todo, &oid)) {\n98b29e0607 4806) todo_list_release(&new_todo);\nc1c074e0cc 4810) if (todo_list_write_to_file(r, &new_todo, todo_file, \nNULL, NULL, -1,\nc1c074e0cc 4812) todo_list_release(&new_todo);\nc1c074e0cc 4813) return error_errno(_(\"could not write '%s'\"), todo_file);\nc1c074e0cc 4816) todo_list_release(&new_todo);\nfebebd99b6 4851) static int todo_list_rearrange_squash(struct todo_list \n*todo_list)\nfebebd99b6 4854) int rearranged = 0, *next, *tail, i, nr = 0, alloc = 0;\nfebebd99b6 4857) struct todo_item *items = NULL;\nfebebd99b6 4870)      NULL, todo_list->nr);\nfebebd99b6 4871) ALLOC_ARRAY(next, todo_list->nr);\nfebebd99b6 4872) ALLOC_ARRAY(tail, todo_list->nr);\nfebebd99b6 4873) ALLOC_ARRAY(subjects, todo_list->nr);\nfebebd99b6 4874) for (i = 0; i < todo_list->nr; i++) {\nfebebd99b6 4876) struct todo_item *item = todo_list->items + i;\nfebebd99b6 4923) - todo_list->items;\nfebebd99b6 4936) todo_list->items[i].command =\nfebebd99b6 4954) for (i = 0; i < todo_list->nr; i++) {\nfebebd99b6 4955) enum todo_command command = todo_list->items[i].command;\nfebebd99b6 4966) ALLOC_GROW(items, nr + 1, alloc);\nfebebd99b6 4967) items[nr++] = todo_list->items[cur];\nfebebd99b6 4972) FREE_AND_NULL(todo_list->items);\nfebebd99b6 4973) todo_list->items = items;\nfebebd99b6 4974) todo_list->nr = nr;\nfebebd99b6 4975) todo_list->alloc = alloc;\nfebebd99b6 4980) for (i = 0; i < todo_list->nr; i++)\nfebebd99b6 4987) return 0;\nfebebd99b6 4990) int rearrange_squash_in_todo_file(struct repository *r)\nfebebd99b6 4992) const char *todo_file = rebase_path_todo();\nfebebd99b6 4993) struct todo_list todo_list = TODO_LIST_INIT;\nfebebd99b6 4994) int res = 0;\nfebebd99b6 4996) if (strbuf_read_file_or_whine(&todo_list.buf, \ntodo_file) < 0)\nfebebd99b6 4997) return -1;\nfebebd99b6 4998) if (todo_list_parse_insn_buffer(r, todo_list.buf.buf, \n&todo_list) < 0) {\nfebebd99b6 4999) todo_list_release(&todo_list);\nfebebd99b6 5000) return -1;\nfebebd99b6 5003) res = todo_list_rearrange_squash(&todo_list);\nfebebd99b6 5004) if (!res)\nfebebd99b6 5005) res = todo_list_write_to_file(r, &todo_list, todo_file, \nNULL, NULL, -1, 0);\nfebebd99b6 5007) todo_list_release(&todo_list);\nfebebd99b6 5009) if (res)\nfebebd99b6 5010) return error_errno(_(\"could not write '%s'.\"), todo_file);\nfebebd99b6 5011) return 0;\n\nsha1-name.c\n4e763fae87 sha1-name.c 1523) int get_oidf(struct object_id *oid, const \nchar *fmt, ...)\n4e763fae87 sha1-name.c 1527) struct strbuf sb = STRBUF_INIT;\n4e763fae87 sha1-name.c 1529) va_start(ap, fmt);\n4e763fae87 sha1-name.c 1530) strbuf_vaddf(&sb, fmt, ap);\n4e763fae87 sha1-name.c 1531) va_end(ap);\n4e763fae87 sha1-name.c 1533) ret = get_oid(sb.buf, oid);\n4e763fae87 sha1-name.c 1534) strbuf_release(&sb);\n4e763fae87 sha1-name.c 1536) return ret;\n3a7a698e93 sha1-name.c 1624) static void \ndiagnose_invalid_index_path(struct index_state *istate,\n3a7a698e93 sha1-name.c 1638) pos = index_name_pos(istate, filename, \nnamelen);\n3a7a698e93 sha1-name.c 1641) if (pos < istate->cache_nr) {\n3a7a698e93 sha1-name.c 1642) ce = istate->cache[pos];\n3a7a698e93 sha1-name.c 1654) pos = index_name_pos(istate, fullname.buf, \nfullname.len);\n3a7a698e93 sha1-name.c 1657) if (pos < istate->cache_nr) {\n3a7a698e93 sha1-name.c 1658) ce = istate->cache[pos];\n3a7a698e93 sha1-name.c 1771) diagnose_invalid_index_path(repo->index, \nstage, prefix, cp);\n\nstrbuf.c\nbfc3fe33f6  252) void strbuf_vinsertf(struct strbuf *sb, size_t pos, \nconst char *fmt, va_list ap)\nbfc3fe33f6  258) if (pos > sb->len)\nbfc3fe33f6  259) die(\"`pos' is too far after the end of the buffer\");\nbfc3fe33f6  260) va_copy(cp, ap);\nbfc3fe33f6  261) len = vsnprintf(sb->buf + sb->len, 0, fmt, cp);\nbfc3fe33f6  262) va_end(cp);\nbfc3fe33f6  263) if (len < 0)\nbfc3fe33f6  265) if (!len)\nbfc3fe33f6  266) return; /* nothing to do */\nbfc3fe33f6  267) if (unsigned_add_overflows(sb->len, len))\nbfc3fe33f6  268) die(\"you want to use way too much memory\");\nbfc3fe33f6  269) strbuf_grow(sb, len);\nbfc3fe33f6  270) memmove(sb->buf + pos + len, sb->buf + pos, sb->len - pos);\nbfc3fe33f6  272) save = sb->buf[pos + len];\nbfc3fe33f6  273) len2 = vsnprintf(sb->buf + pos, sb->alloc - sb->len, \nfmt, ap);\nbfc3fe33f6  274) sb->buf[pos + len] = save;\nbfc3fe33f6  275) if (len2 != len)\nbfc3fe33f6  277) strbuf_setlen(sb, sb->len + len);\nbfc3fe33f6  280) void strbuf_insertf(struct strbuf *sb, size_t pos, \nconst char *fmt, ...)\nbfc3fe33f6  283) va_start(ap, fmt);\nbfc3fe33f6  284) strbuf_vinsertf(sb, pos, fmt, ap);\nbfc3fe33f6  285) va_end(ap);\nbfc3fe33f6  286) }\n0c1599c33c  307) const char *strbuf_join_argv(struct strbuf *buf,\n0c1599c33c  310) if (!argc)\n0c1599c33c  311) return buf->buf;\n0c1599c33c  313) strbuf_addstr(buf, *argv);\n0c1599c33c  314) while (--argc) {\n0c1599c33c  315) strbuf_addch(buf, delim);\n0c1599c33c  316) strbuf_addstr(buf, *(++argv));\n0c1599c33c  319) return buf->buf;\n18f8e81091  442) strbuf_addch(sb, '\\n');\n18f8e81091  443) return 1;\n18f8e81091  446) ch = hex2chr(placeholder + 1);\n18f8e81091  447) if (ch < 0)\n18f8e81091  448) return 0;\n18f8e81091  449) strbuf_addch(sb, ch);\n18f8e81091  450) return 3;\n\ntrailer.c\nced45aab72 1132) size_t origlen = out->len;\nced45aab72 1136) if (!opts->only_trailers && !opts->unfold && \n!opts->filter && !opts->separator) {\n4681fe38e1 1151) if (!opts->filter || opts->filter(&tok, \nopts->filter_data)) {\n4681fe38e1 1152) if (opts->unfold)\n4681fe38e1 1153) unfold_value(&val);\nced45aab72 1155) if (opts->separator && out->len != origlen)\nced45aab72 1156) strbuf_addbuf(out, opts->separator);\ne9da5de761 1157) if (!opts->value_only)\ne9da5de761 1158) strbuf_addf(out, \"%s: \", tok.buf);\ne9da5de761 1159) strbuf_addbuf(out, &val);\nced45aab72 1160) if (!opts->separator)\nced45aab72 1161) strbuf_addch(out, '\\n');\nced45aab72 1167) if (opts->separator && out->len != origlen) {\nced45aab72 1168) strbuf_addbuf(out, opts->separator);\nced45aab72 1171) if (opts->separator) {\nced45aab72 1172) strbuf_rtrim(out);\n\nworktree.c\n2ec5633ff4 587) char *get_worktree_config(struct repository *r)\n2ec5633ff4 589) struct worktree **worktrees = get_worktrees(0);\n2ec5633ff4 592) if (repository_format_worktree_config)\n2ec5633ff4 593) path = repo_git_path(r, \"config.worktree\");\n2ec5633ff4 594) else if (worktrees[0] && worktrees[1])\n2ec5633ff4 595) path = NULL;\n2ec5633ff4 597) path = repo_git_path(r, \"config\");\n2ec5633ff4 599) free_worktrees(worktrees);\n2ec5633ff4 600) return path;\n\nwrapper.c\n5efde212fc  70) die(\"Out of memory, malloc failed (tried to allocate %\" \nPRIuMAX \" bytes)\",\n5efde212fc  73) error(\"Out of memory, malloc failed (tried to allocate \n%\" PRIuMAX \" bytes)\",\n\nwt-status.c\n3a95f31d1c 2378) fd = repo_hold_locked_index(r, &lock_file, 0);\n1b0d968b34 2381) repo_update_index_if_able(r, &lock_file);\n\nCommits introducing uncovered code:\nÆvar Arnfjörð Bjarmason      97b202471: commit-graph write: use pack \norder when finding commits\nAlban Gruin      0566a4f68: sequencer: make sequencer_make_script() \nwrite its script to a strbuf\nAlban Gruin      2b71595d4: sequencer: changes in parse_insn_buffer()\nAlban Gruin      2dd989a69: rebase-interactive: append_todo_help() changes\nAlban Gruin      33bc1844f: sequencer: use edit_todo_list() in \ncomplete_action()\nAlban Gruin      3ebafef41: sequencer: refactor transform_todos() to \nwork on a todo_list\nAlban Gruin      4d55dfd76: rebase-interactive: move \ntransform_todo_file() to rebase--interactive.c\nAlban Gruin      5d94d5456: sequencer: make the todo_list structure public\nAlban Gruin      8414c890a: sequencer: refactor \nsequencer_add_exec_commands() to work on a todo_list\nAlban Gruin      98b29e060: sequencer: refactor skip_unnecessary_picks() \nto work on a todo_list\nAlban Gruin      c1c074e0c: sequencer: change complete_action() to use \nthe refactored functions\nAlban Gruin      c27b32f0e: sequencer: refactor check_todo_list() to \nwork on a todo_list\nAlban Gruin      cf18b3f6c: sequencer: introduce todo_list_write_to_file()\nAlban Gruin      d836079ec: sequencer: remove the 'arg' field from todo_item\nAlban Gruin      e5b1c9d92: rebase-interactive: rewrite edit_todo_list() \nto handle the initial edit\nAlban Gruin      febebd99b: sequencer: refactor rearrange_squash() to \nwork on a todo_list\nAnders Waldenborg      18f8e8109: strbuf: separate callback for \nstrbuf_expand:ing literals\nAnders Waldenborg      4681fe38e: pretty: allow showing specific trailers\nAnders Waldenborg      b755bf6f8: pretty: allow %(trailers) options with \nexplicit value\nAnders Waldenborg      ced45aab7: pretty: add support for separator \noption in %(trailers)\nAnders Waldenborg      e9da5de76: pretty: add support for \"valueonly\" \noption in %(trailers)\nAnders Waldenborg      ffd7cae40: pretty: single return path in \n%(trailers) handling\nBarret Rhoden      07d04b919: blame: add a config option to mark ignored \nlines\nBarret Rhoden      e7973c851: blame: add the ability to ignore commits \nand their changes\nBarret Rhoden      ef644c415: Move init_skiplist() outside of fsck\nDerrick Stolee      3d036eb0d: pack-objects: create pack.useSparse setting\nDerrick Stolee      4f6d26b16: list-objects: consume sparse tree walk\nDerrick Stolee      d5d2e9357: revision: implement sparse algorithm\nDerrick Stolee      f1f5de442: revision: add mark_tree_uninteresting_sparse\nJeff King      240fb9b7a: remote-curl: tighten \"version 2\" check for \nsmart-http\nJeff King      34a9469d6: remote-curl: refactor smart-http discovery\nJiang Xin      a338d1039: pack-redundant: consistent sort method\nJiang Xin      cb7e0336f: pack-redundant: rename pack_list.all_objects\nJoel Teichroeb      cdca49bc4: stash: convert drop and clear to builtin\nJoel Teichroeb      e1d01876a: stash: convert pop to builtin\nJoel Teichroeb      f596f3366: stash: convert branch to builtin\nJoel Teichroeb      f6bbd7812: stash: convert apply to builtin\nJohannes Schindelin      26799a208: stash: optionally use the scripted \nversion again\nJohannes Schindelin      97f56073c: ident: add the ability to provide a \n\"fallback identity\"\nJohannes Schindelin      bec65d5b7: tests: add a special setup where \nstash.useBuiltin is off\nJosh Steadmon      6da1f1a92: protocol: advertise multiple supported \nversions\nJosh Steadmon      e586e7df7: remote-curl: die on server-side errors\nJunio C Hamano      5dde8fc6d: Merge branch 'ds/push-sparse-tree-walk' \ninto pu\nJunio C Hamano      b6b4172bf: Merge branch 'nd/the-index-final' into pu\nLiam Beguin      0cce4a275: rebase -i -x: add exec commands via the \nrebase--helper\nLinus Torvalds      acdd37769: Add 'human' date format\nMartin Koegler      5efde212f: zlib.c: use size_t for size\nMatthew Kraai      ed5d77f7d: stash: fix segmentation fault when files \nwere added with intent\nNguyễn Thái Ngọc Duy      059343267: diff.c: convert --no-prefix\nNguyễn Thái Ngọc Duy      06800238c: config.c: avoid git_path() in \ndo_git_config_sequence()\nNguyễn Thái Ngọc Duy      08339886b: parse-options: avoid magic return codes\nNguyễn Thái Ngọc Duy      08d080bf7: diff.c: convert --word-diff\nNguyễn Thái Ngọc Duy      0d6caa2d0: merge-recursive.c: remove implicit \ndependency on the_index\nNguyễn Thái Ngọc Duy      0eb03c4cd: diff.c: convert --stat*\nNguyễn Thái Ngọc Duy      10e07ecc0: diff.c: convert -M|--find-renames\nNguyễn Thái Ngọc Duy      150fe065f: read-cache.c: remove the_* from \nindex_has_changes()\nNguyễn Thái Ngọc Duy      1b0d968b3: read-cache.c: replace \nupdate_index_if_able with repo_&\nNguyễn Thái Ngọc Duy      1d18d7581: notes-utils.c: remove \nthe_repository references\nNguyễn Thái Ngọc Duy      1d2890f4f: diff.c: convert --submodule\nNguyễn Thái Ngọc Duy      1d8598834: diff.c: convert --textconv\nNguyễn Thái Ngọc Duy      1efc2689d: diff.c: convert --diff-algorithm\nNguyễn Thái Ngọc Duy      2156b1fd0: diff.c: convert --patience\nNguyễn Thái Ngọc Duy      221d67669: diff.c: convert --color-moved\nNguyễn Thái Ngọc Duy      26c50430d: range-diff: use parse_options() \ninstead of diff_opt_parse()\nNguyễn Thái Ngọc Duy      2ec5633ff: worktree.c: add get_worktree_config()\nNguyễn Thái Ngọc Duy      350a71f2f: diff.c: convert --relative\nNguyễn Thái Ngọc Duy      3a7a698e9: sha1-name.c: remove implicit \ndependency on the_index\nNguyễn Thái Ngọc Duy      3a95f31d1: repository.c: replace \nhold_locked_index() with repo_hold_locked_index()\nNguyễn Thái Ngọc Duy      3d810d186: diff.c: convert --output-*\nNguyễn Thái Ngọc Duy      447867144: cache.h: flip \nNO_THE_INDEX_COMPATIBILITY_MACROS switch\nNguyễn Thái Ngọc Duy      5866e9ce9: diff.c: convert --find-object\nNguyễn Thái Ngọc Duy      58c7ef398: diff.c: convert --[no-]compact-summary\nNguyễn Thái Ngọc Duy      6643eb7bb: diff.c: convert -U|--unified\nNguyễn Thái Ngọc Duy      6c0ec4f72: diff.c: convert --line-prefix\nNguyễn Thái Ngọc Duy      6d0300b2e: diff.c: convert --binary\nNguyễn Thái Ngọc Duy      6f11fd5ed: config: add --move-to\nNguyễn Thái Ngọc Duy      7c33a67a2: diff.c: convert --color-moved-ws\nNguyễn Thái Ngọc Duy      8b70e4177: diff.c: convert --ws-error-highlight\nNguyễn Thái Ngọc Duy      8f7c7f555: config.c: add \nrepo_config_set_worktree_gently()\nNguyễn Thái Ngọc Duy      8fc6b47cd: diff.c: convert --[no-]abbrev\nNguyễn Thái Ngọc Duy      963389f6e: diff --no-index: use \nparse_options() instead of diff_opt_parse()\nNguyễn Thái Ngọc Duy      97e53999c: diff.c: convert -C|--find-copies\nNguyễn Thái Ngọc Duy      9b4ae5190: parse-options: allow ll_callback \nwith OPTION_CALLBACK\nNguyễn Thái Ngọc Duy      a12c1ff3a: config: factor out \nset_config_source_file()\nNguyễn Thái Ngọc Duy      afe77a4dd: diff.c: convert --word-diff-regex\nNguyễn Thái Ngọc Duy      b065b6607: diff.c: convert --anchored\nNguyễn Thái Ngọc Duy      b74a81799: diff.c: convert --diff-filter\nNguyễn Thái Ngọc Duy      b9b760ed1: diff.c: convert -B|--break-rewrites\nNguyễn Thái Ngọc Duy      c2dcec4fd: diff.c: convert --[no-]follow\nNguyễn Thái Ngọc Duy      d071ebcc8: diff.c: convert -S|-G\nNguyễn Thái Ngọc Duy      d7cf3a96e: merge-recursive.c: remove implicit \ndependency on the_repository\nNguyễn Thái Ngọc Duy      da9db54b3: diff.c: allow --no-color-moved-ws\nNguyễn Thái Ngọc Duy      dba093ddc: grep: use grep_opt->repo instead of \nexplict repo argument\nNguyễn Thái Ngọc Duy      e1ff0a32e: read-cache.c: kill read_index()\nNguyễn Thái Ngọc Duy      f3b49b7f9: diff.c: convert --color-words\nNguyễn Thái Ngọc Duy      f8d10810d: diff.c: convert --dirstat and friends\nPaul-Sebastian Ungureanu      0c1599c33: strbuf.c: add `strbuf_join_argv()`\nPaul-Sebastian Ungureanu      168e6cff5: stash: optimize \n`get_untracked_files()` and `check_changes()`\nPaul-Sebastian Ungureanu      1f5a011d9: stash: convert create to builtin\nPaul-Sebastian Ungureanu      4e763fae8: sha1-name.c: add `get_oidf()` \nwhich acts like `get_oid()`\nPaul-Sebastian Ungureanu      51809c70c: stash: convert \n`stash--helper.c` into `stash.c`\nPaul-Sebastian Ungureanu      559edead8: stash: replace all `write-tree` \nchild processes with API calls\nPaul-Sebastian Ungureanu      847eb0b0a: stash: convert store to builtin\nPaul-Sebastian Ungureanu      9a95010a1: stash: make push -q quiet\nPaul-Sebastian Ungureanu      9b77b07ba: stash: convert list to builtin\nPaul-Sebastian Ungureanu      b4493f269: stash: convert show to builtin\nPaul-Sebastian Ungureanu      bfc3fe33f: strbuf.c: add \n`strbuf_insertf()` and `strbuf_vinsertf()`\nPaul-Sebastian Ungureanu      cf5b27d69: stash: convert save to builtin\nPaul-Sebastian Ungureanu      fa38428f7: stash: convert push to builtin\nRené Scharfe      878056005: sequencer: factor out \nstrbuf_read_file_or_whine()\nStephen P. Smith      6943bd42f: Add `human` format to test-tool\nStephen P. Smith      86177eb5c: Remove the proposed use of auto as \nsecondary way to specify human\nSun Chao      e4e2c2884: pack-redundant: new algorithm to find min packs\n\n\n\nUncovered code in 'jch' not in 'next'\n----------------------------------------\n\nbuiltin/archive.c\n01f9ec64c8 builtin/archive.c  63) if (starts_with(reader.line, \"NACK \"))\n01f9ec64c8 builtin/archive.c  64) die(_(\"git archive: NACK %s\"), \nreader.line + 5);\n\nbuiltin/bisect--helper.c\n5e82c3dd22 builtin/bisect--helper.c 162) if (get_oid_commit(commit, &oid))\n5e82c3dd22 builtin/bisect--helper.c 163) return error(_(\"'%s' is not a \nvalid commit\"), commit);\n5e82c3dd22 builtin/bisect--helper.c 164) strbuf_addstr(&branch, commit);\n5e82c3dd22 builtin/bisect--helper.c 172) strbuf_release(&branch);\n5e82c3dd22 builtin/bisect--helper.c 173) argv_array_clear(&argv);\n5e82c3dd22 builtin/bisect--helper.c 174) return error(_(\"could not check \nout original\"\n0f30233a11 builtin/bisect--helper.c 215) retval = error(_(\"Bad \nbisect_write argument: %s\"), state);\n0f30233a11 builtin/bisect--helper.c 216) goto finish;\n0f30233a11 builtin/bisect--helper.c 220) retval = error(_(\"couldn't get \nthe oid of the rev '%s'\"), rev);\n0f30233a11 builtin/bisect--helper.c 221) goto finish;\n0f30233a11 builtin/bisect--helper.c 226) retval = -1;\n0f30233a11 builtin/bisect--helper.c 227) goto finish;\n0f30233a11 builtin/bisect--helper.c 232) retval = \nerror_errno(_(\"couldn't open the file '%s'\"), git_path_bisect_log());\n0f30233a11 builtin/bisect--helper.c 233) goto finish;\n129a6cf344 builtin/bisect--helper.c 329) yesno = git_prompt(_(\"Are you \nsure [Y/n]? \"), PROMPT_ECHO);\n129a6cf344 builtin/bisect--helper.c 330) if (starts_with(yesno, \"N\") || \nstarts_with(yesno, \"n\"))\n129a6cf344 builtin/bisect--helper.c 331) retval = -1;\n129a6cf344 builtin/bisect--helper.c 332) goto finish;\n129a6cf344 builtin/bisect--helper.c 338) retval = \nerror(_(need_bisect_start_warning),\n450ebb7359 builtin/bisect--helper.c 389) return error(_(\"invalid \nargument %s for 'git bisect terms'.\\n\"\n06f5608c14 builtin/bisect--helper.c 404) return -1;\n06f5608c14 builtin/bisect--helper.c 407) retval = -1;\n06f5608c14 builtin/bisect--helper.c 408) goto finish;\n06f5608c14 builtin/bisect--helper.c 413) retval = -1;\n06f5608c14 builtin/bisect--helper.c 452) no_checkout = 1;\n06f5608c14 builtin/bisect--helper.c 474)  !one_of(arg, \"--term-good\", \n\"--term-bad\", NULL)) {\n06f5608c14 builtin/bisect--helper.c 475) return error(_(\"unrecognized \noption: '%s'\"), arg);\n06f5608c14 builtin/bisect--helper.c 510) if (get_oid(\"HEAD\", &head_oid))\n06f5608c14 builtin/bisect--helper.c 511) return error(_(\"bad HEAD - I \nneed a HEAD\"));\n06f5608c14 builtin/bisect--helper.c 526) retval = error(_(\"checking out \n'%s' failed.\"\n06f5608c14 builtin/bisect--helper.c 547) return error(_(\"won't bisect on \ncg-seek'ed tree\"));\n06f5608c14 builtin/bisect--helper.c 550) return error(_(\"bad HEAD - \nstrange symbolic ref\"));\n06f5608c14 builtin/bisect--helper.c 558) return -1;\n06f5608c14 builtin/bisect--helper.c 576) retval = -1;\n06f5608c14 builtin/bisect--helper.c 577) goto finish;\n06f5608c14 builtin/bisect--helper.c 588) retval = -1;\n06f5608c14 builtin/bisect--helper.c 589) goto finish;\n06f5608c14 builtin/bisect--helper.c 600) retval = -1;\n5e82c3dd22 builtin/bisect--helper.c 677) return error(_(\"--bisect-reset \nrequires either no argument or a commit\"));\n0f30233a11 builtin/bisect--helper.c 681) return error(_(\"--bisect-write \nrequires either 4 or 5 arguments\"));\n4fbdbd5bff builtin/bisect--helper.c 687) return \nerror(_(\"--check-and-set-terms requires 3 arguments\"));\n129a6cf344 builtin/bisect--helper.c 693) return \nerror(_(\"--bisect-next-check requires 2 or 3 arguments\"));\n\nbuiltin/branch.c\n711d28e2e4 builtin/branch.c 370) strbuf_addf(&local, \n\"%s%%(if:notequals=*)%%(HEAD)%%(then)%%(if)%%(worktreepath)%%(then)%%(worktreepath) \n%%(end)%%(end)%s\",\n0ecb1fc726 builtin/branch.c 460) die(_(\"could not resolve HEAD\"));\n0ecb1fc726 builtin/branch.c 466) die(_(\"HEAD (%s) points outside of \nrefs/heads/\"), refname);\n\nbuiltin/multi-pack-index.c\n334e9745a6 49) die(_(\"--batch-size option is only for 'repack' \nsubcommand\"));\n\nbuiltin/pull.c\nb19eee9066 647) argv_array_push(&args, opt_cleanup);\n\nbuiltin/rebase.c\n21853626ea  258) write_file(state_dir_path(\"verbose\", opts), \"%s\", \"\");\n21853626ea  260) write_file(state_dir_path(\"strategy\", opts), \"%s\",\n21853626ea  263) write_file(state_dir_path(\"strategy_opts\", opts), \"%s\",\n21853626ea  270) write_file(state_dir_path(\"gpg_sign_opt\", opts), \"%s\",\n21853626ea  273) write_file(state_dir_path(\"strategy\", opts), \"--signoff\");\nc5233708c5  396) ret = -1;\nc5233708c5  397) goto leave_reset_head;\nc5233708c5  401) ret = error(_(\"could not determine HEAD revision\"));\nc5233708c5  402) goto leave_reset_head;\nc5233708c5  423) ret = error(_(\"could not read index\"));\nc5233708c5  424) goto leave_reset_head;\nc5233708c5  428) ret = error(_(\"failed to find tree of %s\"),\nc5233708c5  430) goto leave_reset_head;\nc5233708c5  434) ret = error(_(\"failed to find tree of %s\"), \noid_to_hex(oid));\nc5233708c5  435) goto leave_reset_head;\nc5233708c5  447) ret = error(_(\"could not write index\"));\nc5233708c5  448) goto leave_reset_head;\nc5233708c5  466) } else if (old_orig)\nc5233708c5  467) delete_ref(NULL, \"ORIG_HEAD\", old_orig, 0);\n21853626ea  542) argv_array_push(&am.args, opts->gpg_sign_opt);\n21853626ea  574) status = error_errno(_(\"could not open '%s' for writing\"),\n21853626ea  576) free(rebased_patches);\n21853626ea  577) argv_array_clear(&am.args);\n21853626ea  578) return status;\n21853626ea  587) argv_array_split(&format_patch.args,\n21853626ea  588)  opts->git_format_patch_opt.buf);\n21853626ea  596) unlink(rebased_patches);\n21853626ea  597) free(rebased_patches);\n21853626ea  598) argv_array_clear(&am.args);\n21853626ea  600) reset_head(&opts->orig_head, \"checkout\", \nopts->head_name, 0,\n21853626ea  602) error(_(\"\\ngit encountered an error while preparing the \"\n21853626ea  609) strbuf_release(&revisions);\n21853626ea  610) return status;\n21853626ea  616) status = error_errno(_(\"could not open '%s' for reading\"),\n21853626ea  618) free(rebased_patches);\n21853626ea  619) argv_array_clear(&am.args);\n21853626ea  620) return status;\n\nbuiltin/receive-pack.c\n01f9ec64c8 builtin/receive-pack.c 1587)     reader->line + 8);\n01f9ec64c8 builtin/receive-pack.c 1621) die(\"protocol error: got an \nunexpected packet\");\n\nbuiltin/remote.c\nf39a9c6547 builtin/remote.c 1551) die(_(\"--save-to-push cannot be used \nwith other options\"));\nf39a9c6547 builtin/remote.c 1575) die(_(\"--save-to-push can only be used \nwhen only one url is defined\"));\n\ncommit-graph.c\naa658574bf  127) return NULL;\naa658574bf  130) return NULL;\naa658574bf  186) free(graph);\naa658574bf  187) return NULL;\naa658574bf  222) free(graph);\naa658574bf  223) return NULL;\n64415806e8  933) display_progress(oids.progress, approx_nr_objects);\n\nconfig.c\n7e43b32b58 1488) return git_ident_config(var, value, cb);\n7e43b32b58 1491) return git_ident_config(var, value, cb);\n\nfetch-pack.c\n01f9ec64c8  154) die(_(\"git fetch-pack: expected a flush packet after \nshallow list\"));\n01f9ec64c8  358) die(_(\"invalid shallow line: %s\"), reader.line);\n01f9ec64c8  364) die(_(\"invalid unshallow line: %s\"), reader.line);\n01f9ec64c8  366) die(_(\"object not found: %s\"), reader.line);\n01f9ec64c8  369) die(_(\"error in object: %s\"), reader.line);\n01f9ec64c8  371) die(_(\"no shallow found: %s\"), reader.line);\n01f9ec64c8  374) die(_(\"expected shallow/unshallow, got %s\"), reader.line);\n0bbc0bc574 1128) packet_buf_write(&req_buf, \"sideband-all\");\n0bbc0bc574 1350) reader.use_sideband = 1;\n0bbc0bc574 1351) reader.me = \"fetch-pack\";\n\nhttp-walker.c\n514c5fdd03 http-walker.c 550) loose_object_path(the_repository, &buf, \n&req->oid);\n\nident.c\n7e43b32b58 373) email = git_author_email.buf;\n7e43b32b58 375) email = git_committer_email.buf;\n7e43b32b58 394) name = git_author_name.buf;\n7e43b32b58 396) name = git_committer_name.buf;\n7e43b32b58 504) if (!value)\n7e43b32b58 505) return config_error_nonbool(var);\n7e43b32b58 506) strbuf_reset(&git_author_name);\n7e43b32b58 507) strbuf_addstr(&git_author_name, value);\n7e43b32b58 508) author_ident_explicitly_given |= IDENT_NAME_GIVEN;\n7e43b32b58 509) ident_config_given |= IDENT_NAME_GIVEN;\n7e43b32b58 510) return 0;\n7e43b32b58 514) if (!value)\n7e43b32b58 515) return config_error_nonbool(var);\n7e43b32b58 516) strbuf_reset(&git_author_email);\n7e43b32b58 517) strbuf_addstr(&git_author_email, value);\n7e43b32b58 518) author_ident_explicitly_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 519) ident_config_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 520) return 0;\n7e43b32b58 524) if (!value)\n7e43b32b58 525) return config_error_nonbool(var);\n7e43b32b58 526) strbuf_reset(&git_committer_name);\n7e43b32b58 527) strbuf_addstr(&git_committer_name, value);\n7e43b32b58 528) committer_ident_explicitly_given |= IDENT_NAME_GIVEN;\n7e43b32b58 529) ident_config_given |= IDENT_NAME_GIVEN;\n7e43b32b58 530) return 0;\n7e43b32b58 534) if (!value)\n7e43b32b58 535) return config_error_nonbool(var);\n7e43b32b58 536) strbuf_reset(&git_committer_email);\n7e43b32b58 537) strbuf_addstr(&git_committer_email, value);\n7e43b32b58 538) committer_ident_explicitly_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 539) ident_config_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 540) return 0;\n\nmidx.c\ne7a330ee26  428) close_pack(packs->info[packs->nr].p);\ne7a330ee26  429) FREE_AND_NULL(packs->info[packs->nr].p);\n14b7185175  815) error(_(\"did not see pack-file %s to drop\"),\n14b7185175  817) drop_index++;\n14b7185175  818) missing_drops++;\n14b7185175  819) i--;\n14b7185175  826) result = 1;\n14b7185175  827) goto cleanup;\n14b7185175 1073) return 0;\n14b7185175 1088) continue;\n14b7185175 1091) continue;\n17d0bf5a7d 1142) return 0;\n17d0bf5a7d 1151) continue;\n17d0bf5a7d 1164) continue;\n17d0bf5a7d 1187) error(_(\"could not start pack-objects\"));\n17d0bf5a7d 1188) result = 1;\n17d0bf5a7d 1189) goto cleanup;\n17d0bf5a7d 1206) error(_(\"could not finish pack-objects\"));\n17d0bf5a7d 1207) result = 1;\n17d0bf5a7d 1208) goto cleanup;\n\npackfile.c\n9133688752  369) strbuf_release(&buf);\n9133688752  370) return;\n\npkt-line.c\n0bbc0bc574 505) if (demultiplex_sideband(reader->me, reader->buffer,\n0bbc0bc574 508) break;\n0bbc0bc574 509) }\n\nread-cache.c\nee70c12820 1736) if (advice_unknown_index_extension) {\nee70c12820 1737) warning(_(\"ignoring optional %.4s index extension\"), ext);\nee70c12820 1738) advise(_(\"This is likely due to the file having been \nwritten by a newer\\n\"\n\nref-filter.c\na9fb549b1d  467) return 0;\n\nremote-curl.c\n01f9ec64c8  427) die(\"invalid server response; got '%s'\", reader.line);\n01f9ec64c8  439) }\n\nsend-pack.c\n01f9ec64c8 143) return error(_(\"unable to parse remote unpack status: \n%s\"), reader->line);\n01f9ec64c8 162) error(\"invalid ref status from remote: %s\", reader->line);\n01f9ec64c8 579) receive_unpack_status(&reader);\n\nsequencer.c\n899b49c446 2394) opts->quiet = 1;\n\nsha1-file.c\n514c5fdd03 sha1-file.c 1291) status = error(_(\"unable to parse %s \nheader\"), oid_to_hex(oid));\n00a7760e81 sha1-file.c 2305) the_hash_algo->final_fn(real_oid.hash, &c);\n00a7760e81 sha1-file.c 2306) if (!oideq(expected_oid, &real_oid)) {\n\nsideband.c\nfbd76cd450 128) suffix = ANSI_SUFFIX;\nfbd76cd450 138) strbuf_addf(scratch,\nfbd76cd450 140)     scratch->len ? \"\\n\" : \"\", me);\nfbd76cd450 141) *sideband_type = SIDEBAND_PROTOCOL_ERROR;\nfbd76cd450 142) goto cleanup;\n0bbc0bc574 150) die(\"remote error: %s\", buf + 1);\nfbd76cd450 195) strbuf_addf(scratch, \"%s%s: protocol error: bad band #%d\",\nfbd76cd450 196)     scratch->len ? \"\\n\" : \"\", me, band);\nfbd76cd450 197) *sideband_type = SIDEBAND_PROTOCOL_ERROR;\nfbd76cd450 198) break;\n0bbc0bc574 203) die(\"%s\", scratch->buf);\n\nupload-pack.c\n01f9ec64c8  432) die(\"git upload-pack: expected SHA1 list, got '%s'\", \nreader->line);\n0bbc0bc574 1066) allow_sideband_all = git_config_bool(var, value);\n07c3c2aa16 1306)      allow_sideband_all) &&\n07c3c2aa16 1307)     !strcmp(arg, \"sideband-all\")) {\n0bbc0bc574 1308) data->writer.use_sideband = 1;\n0bbc0bc574 1309) continue;\nbc2e795cea 1441) deepen(&data->writer, INFINITE_DEPTH, \ndata->deepen_relative,\n07c3c2aa16 1544)    &allow_sideband_all_value) &&\n\nworktree.c\nebefff3c73 465) clear_repository_format(&format);\n\nwrapper.c\ne3b1e3bdc0 701) die_errno(_(\"could not stat %s\"), filename);\n\nCommits introducing uncovered code:\nÆvar Arnfjörð Bjarmason      64415806e: commit-graph write: show \nprogress for object search\nDaniels Umanovskis      0ecb1fc72: branch: introduce --show-current \ndisplay option\nDenton Liu      b19eee906: merge: add scissors line on merge conflict\nDenton Liu      f39a9c654: remote: add --save-to-push option to git \nremote set-url\nDerrick Stolee      14b718517: multi-pack-index: implement 'expire' \nsubcommand\nDerrick Stolee      17d0bf5a7: midx: implement midx_repack()\nDerrick Stolee      334e9745a: multi-pack-index: prepare 'repack' subcommand\nDerrick Stolee      913368875: repack: refactor pack deletion for future use\nDerrick Stolee      e7a330ee2: midx: refactor permutation logic and pack \nsorting\nElijah Newren      899b49c44: git-rebase, sequencer: extend --quiet \noption for the interactive machinery\nJeff King      00a7760e8: sha1-file: modernize loose header/stream functions\nJeff King      514c5fdd0: sha1-file: modernize loose object file functions\nJohannes Schindelin      21853626e: built-in rebase: call `git am` directly\nJohannes Schindelin      c5233708c: rebase: move `reset_head()` into a \nbetter spot\nJonathan Nieder      ee70c1282: index: offer advice for unknown index \nextensions\nJonathan Tan      07c3c2aa1: tests: define GIT_TEST_SIDEBAND_ALL\nJonathan Tan      0bbc0bc57: {fetch,upload}-pack: sideband v2 fetch response\nJonathan Tan      bc2e795ce: pkt-line: introduce struct packet_writer\nJonathan Tan      fbd76cd45: sideband: reverse its dependency on pkt-line\nJosh Steadmon      aa658574b: commit-graph, fuzz: add fuzzer for \ncommit-graph\nMartin Ågren      ebefff3c7: setup: add `clear_repository_format()`\nMasaya Suzuki      01f9ec64c: Use packet_reader instead of packet_read_line\nNickolai Belakovski      711d28e2e: branch: add an extra verbose output \ndisplaying worktree path for checked out branch\nNickolai Belakovski      a9fb549b1: ref-filter: add worktreepath atom\nPranit Bauva      06f5608c1: bisect--helper: `bisect_start` shell \nfunction partially in C\nPranit Bauva      0f30233a1: bisect--helper: `bisect_write` shell \nfunction in C\nPranit Bauva      129a6cf34: bisect--helper: `bisect_next_check` shell \nfunction in C\nPranit Bauva      450ebb735: bisect--helper: `get_terms` & \n`bisect_terms` shell function in C\nPranit Bauva      4fbdbd5bf: bisect--helper: `check_and_set_terms` shell \nfunction in C\nPranit Bauva      5e82c3dd2: bisect--helper: `bisect_reset` shell \nfunction in C\nPranit Bauva      e3b1e3bdc: wrapper: move is_empty_file() and rename it \nas is_empty_or_missing_file()\nWilliam Hubbs      7e43b32b5: Add author and committer configuration \nsettings\n\n\n\nUncovered code in 'next' not in 'master'\n--------------------------------------------\n\nbuiltin/checkout.c\n091e04bc8c builtin/checkout.c  302) return;\n091e04bc8c builtin/checkout.c 1268) die(_(\"'%s' cannot be used with \nswitching branches\"),\n\nbuiltin/fetch-pack.c\n4316ff3068 builtin/fetch-pack.c 226) get_remote_refs(fd[1], &reader, \n&ref, 0, NULL, NULL);\n4316ff3068 builtin/fetch-pack.c 227) break;\n\nbuiltin/fetch.c\ne01378753d builtin/fetch.c 1479) die(_(\"--filter can only be used with \nthe remote \"\ne01378753d builtin/fetch.c 1648) die(_(\"--filter can only be used with \nthe remote \"\n\nbuiltin/rebase.c\n81ef8ee75d  773) return -1;\nd421afa0c6 1258) die(_(\"--reschedule-failed-exec requires an interactive \nrebase\"));\nd421afa0c6 1296) die(_(\"error: cannot combine '--preserve-merges' with \"\n\ndiff.c\nb73bcbac4a  308) ret = 0;\n21536d077f  812)        (s[off] == '\\r' && off < len - 1))\n21536d077f  813) off++;\nb73bcbac4a 5112) options->color_moved_ws_handling = 0;\n\nentry.c\nhex.c\n47edb64997  93) char *sha1_to_hex_r(char *buffer, const unsigned char *sha1)\n47edb64997  95) return hash_to_hex_algop_r(buffer, sha1, \n&hash_algos[GIT_HASH_SHA1]);\n47edb64997 116) char *hash_to_hex(const unsigned char *hash)\n47edb64997 118) return hash_to_hex_algop(hash, the_hash_algo);\n\nhttp-push.c\nea82b2a085 1314) p = process_tree(lookup_tree(the_repository, &entry.oid),\n\nhttp.c\ne6cf87b12d 1999) if (fflush(result)) {\ne6cf87b12d 2000) error_errno(\"unable to flush a file\");\ne6cf87b12d 2001) return HTTP_START_FAILED;\ne6cf87b12d 2003) rewind(result);\ne6cf87b12d 2004) if (ftruncate(fileno(result), 0) < 0) {\ne6cf87b12d 2005) error_errno(\"unable to truncate a file\");\ne6cf87b12d 2006) return HTTP_START_FAILED;\ne6cf87b12d 2008) break;\n\nlist-objects-filter.c\nc813a7c35f 199) return;\n\nmatch-trees.c\nf55ac4311a 231) hashcpy(tree_oid.hash, rewrite_here);\nf55ac4311a 232) status = splice_tree(&tree_oid, subpath, oid2, &subtree);\n\npretty.c\nad6f028f06 1204) return 0;\n\nremote-curl.c\nb79bdd8c12  566) return size;\n\nsha1-file.c\n2f90b9d9b4 sha1-file.c  172) int hash_algo_by_name(const char *name)\n2f90b9d9b4 sha1-file.c  175) if (!name)\n2f90b9d9b4 sha1-file.c  176) return GIT_HASH_UNKNOWN;\n2f90b9d9b4 sha1-file.c  177) for (i = 1; i < GIT_HASH_NALGOS; i++)\n2f90b9d9b4 sha1-file.c  178) if (!strcmp(name, hash_algos[i].name))\n2f90b9d9b4 sha1-file.c  179) return i;\n2f90b9d9b4 sha1-file.c  180) return GIT_HASH_UNKNOWN;\n2f90b9d9b4 sha1-file.c  183) int hash_algo_by_id(uint32_t format_id)\n2f90b9d9b4 sha1-file.c  186) for (i = 1; i < GIT_HASH_NALGOS; i++)\n2f90b9d9b4 sha1-file.c  187) if (format_id == hash_algos[i].format_id)\n2f90b9d9b4 sha1-file.c  188) return i;\n2f90b9d9b4 sha1-file.c  189) return GIT_HASH_UNKNOWN;\n\nsubmodule.c\n26f80ccfc1 1398) strbuf_release(&gitdir);\nbe76c21282 1521) struct fetch_task *task = task_cb;\nbe76c21282 1525) fetch_task_release(task);\n\ntree-walk.c\n0a3faa45b1  530) oidcpy(result, &oid);\n\ntree.c\n60c38b9e4a 104) commit = lookup_commit(r, &entry.oid);\n\nupload-pack.c\n87c2d9d310  147) sq_quote_buf(&buf, expanded_filter_spec.buf);\n\nCommits introducing uncovered code:\nbrian m. carlson      0a3faa45b: tree-walk: copy object ID before use\nbrian m. carlson      2f90b9d9b: sha1-file: provide functions to look up \nhash algorithms\nbrian m. carlson      47edb6499: hex: introduce functions to print \narbitrary hashes\nbrian m. carlson      ea82b2a08: tree-walk: store object_id in a \nseparate member\nbrian m. carlson      f55ac4311: match-trees: use hashcpy to splice trees\nChristian Couder      e01378753: fetch: fix extensions.partialclone name \nin error message\nIssac Trotts      ad6f028f0: log: add %S option (like --source) to log \n--format\nJohannes Schindelin      81ef8ee75: rebase: introduce a shortcut for \n--reschedule-failed-exec\nJohannes Schindelin      d421afa0c: rebase: introduce \n--reschedule-failed-exec\nJonathan Tan      4316ff306: fetch-pack: support protocol version 2\nJosh Steadmon      87c2d9d31: filter-options: expand scaled numbers\nJunio C Hamano      60c38b9e4: Merge branch 'bc/tree-walk-oid' into next\nMasaya Suzuki      b79bdd8c1: remote-curl: unset CURLOPT_FAILONERROR\nMasaya Suzuki      e6cf87b12: http: enable keep_error for HTTP requests\nMatthew DeVore      c813a7c35: list-objects-filter: teach tree:# how to \nhandle >0\nPhillip Wood      21536d077: diff --color-moved-ws: modify \nallow-indentation-change\nPhillip Wood      b73bcbac4: diff: allow --no-color-moved-ws\nStefan Beller      26f80ccfc: submodule: migrate get_next_submodule to \nuse repository structs\nStefan Beller      be76c2128: fetch: ensure submodule objects fetched\nThomas Gummerer      091e04bc8: checkout: introduce --{,no-}overlay option\n\n\n\nUncovered code in 'master' not in 'master@{1}'\n----------------------------------------------------\n\nbuiltin/submodule--helper.c\nbuiltin/worktree.c\n00a6d4d1d2 752) found_submodules = 1;\n00a6d4d1d2 753) break;\n\ncommit-graph.c\nref-filter.c\n1867ce6cbe  236) oi_deref.info.sizep = &oi_deref.size;\n1867ce6cbe  245) return strbuf_addf_ret(err, -1, _(\"unrecognized \n%%(objectsize) argument: %s\"), arg);\n33311fa1ad  253) return strbuf_addf_ret(err, -1, _(\"%%(deltabase) does \nnot take arguments\"));\n\nsetup.c\n07098b81a4 1093) if (!nongit_ok)\n07098b81a4 1094) die(_(\"not a git repository (or any parent up to mount \npoint %s)\\n\"\n07098b81a4 1097) *nongit_ok = 1;\n07098b81a4 1098) break;\n\ntransport-helper.c\n3b3357626e 1029) static int has_attribute(const char *attrs, const char \n*attr)\n\nCommits introducing uncovered code:\nErin Dahlgren      07098b81a: Simplify handling of \nsetup_git_directory_gently() failure cases.\nNguyễn Thái Ngọc Duy      00a6d4d1d: worktree: allow to (re)move \nworktrees with uninitialized submodules\nNguyễn Thái Ngọc Duy      3b3357626: style: the opening '{' of a \nfunction is in a separate line\nOlga Telezhnaya      1867ce6cb: ref-filter: add objectsize:disk option\nOlga Telezhnaya      33311fa1a: ref-filter: add deltabase option\n\n"},{"id":"367569","messageId":"xmqqa7jp53d2.fsf@gitster-ct.c.googlers.com","threadId":"50268","inReplyTo":"6addc879-a792-202f-2aeb-7097ea344894@gmail.com","subject":"Re: Git Test Coverage Report (Sat Jan 19)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-24T18:15:21Z","receivedAt":"2019-01-24T18:15:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Derrick Stolee <stolee@gmail.com> writes:\n\n> Here is today's test coverage report.\n>\n> Also, there has been some feedback that it can be hard to manually\n> match up uncovered lines with names at the bottom of the summary. The\n> suggestion was to auto-generate an HTML report that could be posted to\n> a public page and referenced in this mail for those who prefer\n> that.\n\nI wanted to \"grep\" for lines attributed to certain commits that\nappear in the list, by filtering lines that begin with enough number\nof hexdigits, except for those object names, but the attempt failed\nmiserably because of the line wrapping (which probably comes from\nthe assumption that it is OK because the \"text/plain; format=flowed\"\nwould not care).  If you can keep the long lines (due to the object\nnames and line numbers prefixed to each line) unsplit, it would be\nmore useful to locate and isolate lines.\n\n\n\n\n"},{"id":"367583","messageId":"7aaec7c8-6cf9-fbd5-fbaf-60b110e2bac7@gmail.com","threadId":"50268","inReplyTo":"xmqqa7jp53d2.fsf@gitster-ct.c.googlers.com","subject":"Re: Git Test Coverage Report (Sat Jan 19)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-01-24T19:18:52Z","receivedAt":"2019-01-24T19:18:55Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/24/2019 1:15 PM, Junio C Hamano wrote:\n> Derrick Stolee <stolee@gmail.com> writes:\n>\n>> Here is today's test coverage report.\n>>\n>> Also, there has been some feedback that it can be hard to manually\n>> match up uncovered lines with names at the bottom of the summary. The\n>> suggestion was to auto-generate an HTML report that could be posted to\n>> a public page and referenced in this mail for those who prefer\n>> that.\n> I wanted to \"grep\" for lines attributed to certain commits that\n> appear in the list, by filtering lines that begin with enough number\n> of hexdigits, except for those object names, but the attempt failed\n> miserably because of the line wrapping (which probably comes from\n> the assumption that it is OK because the \"text/plain; format=flowed\"\n> would not care).  If you can keep the long lines (due to the object\n> names and line numbers prefixed to each line) unsplit, it would be\n> more useful to locate and isolate lines.\nThis is likely more a problem with my workflow (pasting the report into \nThunderbird and sending) than with the content itself.\n\nIf I instead created a text document and sent it with `git send-email`, \nthen would the line endings work the way you want?\n\nThanks,\n-Stolee\n"},{"id":"367586","messageId":"5fe36d0a-e7f1-6349-27ed-a6d48a3ba1e3@ramsayjones.plus.com","threadId":"50268","inReplyTo":"7aaec7c8-6cf9-fbd5-fbaf-60b110e2bac7@gmail.com","subject":"Re: Git Test Coverage Report (Sat Jan 19)","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2019-01-24T19:39:14Z","receivedAt":"2019-01-24T19:52:03Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 24/01/2019 19:18, Derrick Stolee wrote:\n> On 1/24/2019 1:15 PM, Junio C Hamano wrote:\n>> Derrick Stolee <stolee@gmail.com> writes:\n>>\n>>> Here is today's test coverage report.\n>>>\n>>> Also, there has been some feedback that it can be hard to manually\n>>> match up uncovered lines with names at the bottom of the summary. The\n>>> suggestion was to auto-generate an HTML report that could be posted to\n>>> a public page and referenced in this mail for those who prefer\n>>> that.\n>> I wanted to \"grep\" for lines attributed to certain commits that\n>> appear in the list, by filtering lines that begin with enough number\n>> of hexdigits, except for those object names, but the attempt failed\n>> miserably because of the line wrapping (which probably comes from\n>> the assumption that it is OK because the \"text/plain; format=flowed\"\n>> would not care).  If you can keep the long lines (due to the object\n>> names and line numbers prefixed to each line) unsplit, it would be\n>> more useful to locate and isolate lines.\n> This is likely more a problem with my workflow (pasting the report into Thunderbird and sending) than with the content itself.\n\nHave you read Doucmentation/git-format-patch.txt (Thunderbird>\nApproach #2 (configuration) - approx. line 487)?\n\nATB,\nRamsay Jones\n"},{"id":"367599","messageId":"00d82fc1-e908-51b5-5d72-ec48298acedf@gmail.com","threadId":"50268","inReplyTo":"5fe36d0a-e7f1-6349-27ed-a6d48a3ba1e3@ramsayjones.plus.com","subject":"Re: Git Test Coverage Report (Sat Jan 19)","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-01-24T20:56:16Z","receivedAt":"2019-01-24T20:56:28Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/24/2019 2:39 PM, Ramsay Jones wrote:\n> \n> \n> On 24/01/2019 19:18, Derrick Stolee wrote:\n>> On 1/24/2019 1:15 PM, Junio C Hamano wrote:\n>>> Derrick Stolee <stolee@gmail.com> writes:\n>>>\n>>>> Here is today's test coverage report.\n>>>>\n>>>> Also, there has been some feedback that it can be hard to manually\n>>>> match up uncovered lines with names at the bottom of the summary. The\n>>>> suggestion was to auto-generate an HTML report that could be posted to\n>>>> a public page and referenced in this mail for those who prefer\n>>>> that.\n>>> I wanted to \"grep\" for lines attributed to certain commits that\n>>> appear in the list, by filtering lines that begin with enough number\n>>> of hexdigits, except for those object names, but the attempt failed\n>>> miserably because of the line wrapping (which probably comes from\n>>> the assumption that it is OK because the \"text/plain; format=flowed\"\n>>> would not care).  If you can keep the long lines (due to the object\n>>> names and line numbers prefixed to each line) unsplit, it would be\n>>> more useful to locate and isolate lines.\n>> This is likely more a problem with my workflow (pasting the report into Thunderbird and sending) than with the content itself.\n> \n> Have you read Doucmentation/git-format-patch.txt (Thunderbird>\n> Approach #2 (configuration) - approx. line 487)?\n> \n> ATB,\n> Ramsay Jones\n> \n\nThanks, Ramsay! I adjusted the settings and am re-pasting the latest\nreport below. Let me know if everything improved.\n\nThanks,\n-Stolee\n\n\npu: 32ea0d952e6add9269432e6e2b31fd552e5478c0\njch: bc1fa105c1c1d5870a7e2800526f0a7ebf17d064\nnext: aa96b0ce6b0fa4fa4cc6870f1a3aff3878967bfa\nmaster: 16a465bc018d09e9d7bbbdc5f40a7fb99c21f8ef\nmaster@{1}: 77556354bb7ac50450e3b28999e3576969869068\n\nUncovered code in 'pu' not in 'jch'\n--------------------------------------\n\nbisect.c\n4f6d26b167  661) mark_edges_uninteresting(revs, NULL, 0);\n\nblame.c\ne1ff0a32e4  191) repo_read_index(r);\ne1ff0a32e4  273) repo_read_index(r);\n07d04b919e  482)     ent->s_lno + ent->num_lines == next->s_lno &&\n07d04b919e  483)     ent->ignored == next->ignored) {\n07d04b919e  735) split[0].ignored = split[1].ignored = split[2].ignored = e->ignored;\ne7973c8519  859) struct blame_entry *samep = NULL, *diffp = NULL, *ignoredp = NULL;\n07d04b919e  873) n->ignored = e->ignored;\n07d04b919e  928) n->ignored = e->ignored;\ne7973c8519  938) if (ignore_diffs) {\ne7973c8519  940) blame_origin_decref(e->suspect);\ne7973c8519  941) e->suspect = blame_origin_incref(parent);\ne7973c8519  942) e->s_lno += offset;\n07d04b919e  943) e->ignored = 1;\ne7973c8519  944) e->next = ignoredp;\ne7973c8519  945) ignoredp = e;\ne7973c8519  947) e->next = diffp;\ne7973c8519  948) diffp = e;\ne7973c8519  952) if (ignoredp) {\ne7973c8519  953) **dstq = reverse_blame(ignoredp, **dstq);\ne7973c8519  954) *dstq = &ignoredp->next;\ne7973c8519 1001) d.ignore_diffs = ignore_diffs;\ne7973c8519 1013) blame_chunk(&d.dstq, &d.srcq, INT_MAX, d.offset, INT_MAX, parent, 0);\ne7973c8519 1518) pass_blame_to_parent(sb, origin, porigin, 0);\ne7973c8519 1526) if (oidset_contains(&sb->ignore_list, &commit->object.oid)) {\ne7973c8519 1527) for (i = 0, sg = first_scapegoat(revs, commit, sb->reverse);\ne7973c8519 1528)      i < num_sg && sg;\ne7973c8519 1529)      sg = sg->next, i++) {\ne7973c8519 1530) struct blame_origin *porigin = sg_origin[i];\ne7973c8519 1532) if (!porigin)\ne7973c8519 1533) continue;\ne7973c8519 1534) pass_blame_to_parent(sb, origin, porigin, 1);\ne7973c8519 1535) if (!origin->suspects)\ne7973c8519 1536) goto finish;\n\nbuiltin/am.c\n1d18d7581c  515) finish_copy_notes_for_rewrite(the_repository, c, msg);\n150fe065f7 1765)     !repo_index_has_changes(the_repository, NULL, NULL)) {\n150fe065f7 1819) if (!repo_index_has_changes(the_repository, NULL, NULL)) {\n\nbuiltin/blame.c\n07d04b919e builtin/blame.c    484) if (mark_ignored_lines && ent->ignored) {\n07d04b919e builtin/blame.c    485) length--;\n07d04b919e builtin/blame.c    486) putchar('*');\ne7973c8519 builtin/blame.c    704) if (!strcmp(var, \"blame.ignorerevsfile\"))\ne7973c8519 builtin/blame.c    705) return git_config_pathname(&ignore_revs_file, var, value);\n07d04b919e builtin/blame.c    706) if (!strcmp(var, \"blame.markignoredlines\")) {\n07d04b919e builtin/blame.c    707) mark_ignored_lines = git_config_bool(var, value);\n07d04b919e builtin/blame.c    708) return 0;\ne7973c8519 builtin/blame.c    789) static void build_ignorelist(struct blame_scoreboard *sb,\ne7973c8519 builtin/blame.c    795) oidset_init(&sb->ignore_list, 0);\ne7973c8519 builtin/blame.c    796) if (ignore_revs_file)\ne7973c8519 builtin/blame.c    797) oidset_parse_file(&sb->ignore_list, ignore_revs_file);\ne7973c8519 builtin/blame.c    798) for_each_string_list_item(i, ignore_rev_list) {\ne7973c8519 builtin/blame.c    799) if (get_oid_committish(i->string, &oid))\ne7973c8519 builtin/blame.c    800) die(_(\"Can't find revision '%s' to ignore\"), i->string);\ne7973c8519 builtin/blame.c    801) oidset_insert(&sb->ignore_list, &oid);\ne7973c8519 builtin/blame.c    803) }\nacdd37769d builtin/blame.c    961) blame_date_width = sizeof(\"Thu Oct 19 16:00\");\nacdd37769d builtin/blame.c    962) break;\ne7973c8519 builtin/blame.c   1033) build_ignorelist(&sb, &ignore_rev_list);\ne7973c8519 builtin/blame.c   1034) string_list_clear(&ignore_rev_list, 0);\n4478671442 builtin/blame.c   1048)     the_repository->index))\n\nbuiltin/checkout.c\n0d6caa2d08 builtin/checkout.c  751) init_merge_options(&o, the_repository);\n\nbuiltin/commit.c\n1d18d7581c builtin/commit.c 1689) commit_post_rewrite(the_repository, current_head, &oid);\n\nbuiltin/config.c\na12c1ff3a5 builtin/config.c       85) die(_(\"only one config file at a time\"));\na12c1ff3a5 builtin/config.c       88) die(_(\"--local can only be used inside a git repository\"));\na12c1ff3a5 builtin/config.c       91) die(_(\"--blob can only be used inside a git repository\"));\na12c1ff3a5 builtin/config.c       95) given_config_source.file = NULL;\na12c1ff3a5 builtin/config.c       96) given_config_source.use_stdin = 1;\na12c1ff3a5 builtin/config.c      110) die(_(\"$HOME not set\"));\na12c1ff3a5 builtin/config.c      114) given_config_source.file = xdg_config;\na12c1ff3a5 builtin/config.c      115) free(user_config);\na12c1ff3a5 builtin/config.c      122) given_config_source.file = git_etc_gitconfig();\na12c1ff3a5 builtin/config.c      126) given_config_source.file = get_worktree_config(the_repository);\na12c1ff3a5 builtin/config.c      127) if (!given_config_source.file)\na12c1ff3a5 builtin/config.c      128) die(_(\"--worktree cannot be used with multiple \"\n6f11fd5edb builtin/config.c      185) static int option_move_cb(const struct option *opt,\n6f11fd5edb builtin/config.c      188) BUG_ON_OPT_NEG(unset);\n6f11fd5edb builtin/config.c      189) BUG_ON_OPT_ARG(arg);\n6f11fd5edb builtin/config.c      191) set_config_source_file();\n6f11fd5edb builtin/config.c      192) memcpy(&move_source, &given_config_source, sizeof(move_source));\n6f11fd5edb builtin/config.c      194) memset(&given_config_source, 0, sizeof(given_config_source));\n6f11fd5edb builtin/config.c      195) use_global_config = 0;\n6f11fd5edb builtin/config.c      196) use_system_config = 0;\n6f11fd5edb builtin/config.c      197) use_local_config = 0;\n6f11fd5edb builtin/config.c      198) use_worktree_config = 0;\n6f11fd5edb builtin/config.c      200) actions = opt->defval;\n6f11fd5edb builtin/config.c      201) return 0;\n6f11fd5edb builtin/config.c      471) static int collect_move_config(const char *key, const char *value, void *cb)\n6f11fd5edb builtin/config.c      473) struct move_config_cb *data = cb;\n6f11fd5edb builtin/config.c      475) switch (actions) {\n6f11fd5edb builtin/config.c      477) if (strcasecmp(data->key, key))\n6f11fd5edb builtin/config.c      478) return 0;\n6f11fd5edb builtin/config.c      479) break;\n6f11fd5edb builtin/config.c      481) if (regexec(&data->key_re, key, 0, NULL, 0))\n6f11fd5edb builtin/config.c      482) return 0;\n6f11fd5edb builtin/config.c      483) break;\n6f11fd5edb builtin/config.c      485) if (wildmatch(data->key, key, WM_CASEFOLD))\n6f11fd5edb builtin/config.c      486) return 0;\n6f11fd5edb builtin/config.c      487) break;\n6f11fd5edb builtin/config.c      492) string_list_append(&data->keys, key)->util = xstrdup(value);\n6f11fd5edb builtin/config.c      493) return 0;\n6f11fd5edb builtin/config.c      496) static int move_config(const char *key)\n6f11fd5edb builtin/config.c      499) int i, ret = 0;\n6f11fd5edb builtin/config.c      501) config_options.respect_includes = 0;\n6f11fd5edb builtin/config.c      502) if (!move_source.file && !move_source.use_stdin && !move_source.blob)\n6f11fd5edb builtin/config.c      503) die(_(\"unknown config source\"));\n6f11fd5edb builtin/config.c      505) string_list_init(&cb.keys, 1);\n6f11fd5edb builtin/config.c      506) cb.key = key;\n6f11fd5edb builtin/config.c      507) if (actions == ACTION_MOVE_REGEXP &&\n6f11fd5edb builtin/config.c      508)     regcomp(&cb.key_re, key, REG_EXTENDED | REG_ICASE))\n6f11fd5edb builtin/config.c      509) die(_(\"invalid key pattern: %s\"), key);\n6f11fd5edb builtin/config.c      511) config_with_options(collect_move_config, &cb,\n6f11fd5edb builtin/config.c      514) for (i = 0; i < cb.keys.nr && !ret; i++) {\n6f11fd5edb builtin/config.c      515) const char *key = cb.keys.items[i].string;\n6f11fd5edb builtin/config.c      516) const char *value = cb.keys.items[i].util;\n6f11fd5edb builtin/config.c      517) const char *dest = given_config_source.file;\n6f11fd5edb builtin/config.c      519) ret = git_config_set_multivar_in_file_gently(\n6f11fd5edb builtin/config.c      527) if (!ret && move_source.file) {\n6f11fd5edb builtin/config.c      528) for (i = 0; i < cb.keys.nr; i++) {\n6f11fd5edb builtin/config.c      529) const char *key = cb.keys.items[i].string;\n6f11fd5edb builtin/config.c      530) const char *src = move_source.file;\n6f11fd5edb builtin/config.c      532) git_config_set_multivar_in_file_gently(\n6f11fd5edb builtin/config.c      537) string_list_clear(&cb.keys, 1);\n6f11fd5edb builtin/config.c      538) if (actions == ACTION_MOVE_REGEXP)\n6f11fd5edb builtin/config.c      539) regfree(&cb.key_re);\n6f11fd5edb builtin/config.c      540) return ret;\n6f11fd5edb builtin/config.c      979) else if (actions == ACTION_MOVE ||\n6f11fd5edb builtin/config.c      980)  actions == ACTION_MOVE_REGEXP ||\n6f11fd5edb builtin/config.c      981)  actions == ACTION_MOVE_GLOB) {\n6f11fd5edb builtin/config.c      982) check_write();\n6f11fd5edb builtin/config.c      983) check_argc(argc, 1, 1);\n6f11fd5edb builtin/config.c      984) return move_config(argv[0]);\n\nbuiltin/describe.c\n1b0d968b34 builtin/describe.c 638) repo_update_index_if_able(the_repository, &index_lock);\n\nbuiltin/diff-tree.c\ne1ff0a32e4 builtin/diff-tree.c 169) repo_read_index(the_repository);\n\nbuiltin/grep.c\ndba093ddc0 builtin/grep.c  403) static int grep_submodule(struct grep_opt *opt,\ndba093ddc0 builtin/grep.c  409) struct repository *superproject = opt->repo;\ndba093ddc0 builtin/grep.c  448) memcpy(&subopt, opt, sizeof(subopt));\nb6b4172bfb builtin/grep.c  449) subopt.repo = &subrepo;\ndba093ddc0 builtin/grep.c  472) hit = grep_tree(&subopt, pathspec, &tree, &base, base.len,\ndba093ddc0 builtin/grep.c  473) object->type == OBJ_COMMIT);\ndba093ddc0 builtin/grep.c  477) hit = grep_cache(&subopt, pathspec, 1);\ndba093ddc0 builtin/grep.c  484) static int grep_cache(struct grep_opt *opt,\ndba093ddc0 builtin/grep.c  487) struct repository *repo = opt->repo;\ndba093ddc0 builtin/grep.c  525) hit |= grep_submodule(opt, pathspec, NULL, ce->name, ce->name);\ndba093ddc0 builtin/grep.c  549) struct repository *repo = opt->repo;\nb6b4172bfb builtin/grep.c  599) hit |= grep_submodule(opt, pathspec, &entry.oid,\ndba093ddc0 builtin/grep.c  641) obj->type == OBJ_COMMIT);\ndba093ddc0 builtin/grep.c  658) real_obj = deref_tag(opt->repo, list->objects[i].item,\ndba093ddc0 builtin/grep.c  663) submodule_free(opt->repo);\ndba093ddc0 builtin/grep.c  688) fill_directory(&dir, opt->repo->index, pathspec);\ndba093ddc0 builtin/grep.c  690) if (!dir_path_match(opt->repo->index, dir.entries[i], pathspec, 0, NULL))\n3a7a698e93 builtin/grep.c 1028) if (get_oid_with_context(the_repository, arg,\ndba093ddc0 builtin/grep.c 1132) hit = grep_cache(&opt, &pathspec, cached);\n\nbuiltin/log.c\n3a7a698e93 builtin/log.c  513) if (get_oid_with_context(the_repository, obj_name,\n\nbuiltin/merge-tree.c\n4478671442 builtin/merge-tree.c  80) return merge_blobs(the_repository->index, path,\n\nbuiltin/merge.c\n08339886b9 builtin/merge.c  120) static enum parse_opt_result option_read_message(struct parse_opt_ctx_t *ctx,\n9b4ae5190a builtin/merge.c  128) BUG_ON_OPT_ARG(arg_not_used);\n\nbuiltin/notes.c\n1d18d7581c builtin/notes.c  333) commit_notes(the_repository, t, msg);\n1d18d7581c builtin/notes.c  336) finish_copy_notes_for_rewrite(the_repository, c, msg);\n1d18d7581c builtin/notes.c  472) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  478) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  557) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  642) commit_notes(the_repository, t, logmsg);\n1d18d7581c builtin/notes.c  943) commit_notes(the_repository, t,\n1d18d7581c builtin/notes.c  972) commit_notes(the_repository, t,\n\nbuiltin/pack-objects.c\n3d036eb0d2 builtin/pack-objects.c 2716) sparse = git_config_bool(k, v);\n3d036eb0d2 builtin/pack-objects.c 2717) return 0;\n\nbuiltin/pack-redundant.c\na338d10395 builtin/pack-redundant.c 339) static int cmp_remaining_objects(const void *a, const void *b)\ne4e2c2884e builtin/pack-redundant.c 341) struct pack_list *pl_a = *((struct pack_list **)a);\ne4e2c2884e builtin/pack-redundant.c 342) struct pack_list *pl_b = *((struct pack_list **)b);\na338d10395 builtin/pack-redundant.c 344) if (pl_a->remaining_objects->size == pl_b->remaining_objects->size) {\na338d10395 builtin/pack-redundant.c 346) if (pl_a->all_objects_size == pl_b->all_objects_size)\na338d10395 builtin/pack-redundant.c 347) return 0;\na338d10395 builtin/pack-redundant.c 348) else if (pl_a->all_objects_size < pl_b->all_objects_size)\na338d10395 builtin/pack-redundant.c 349) return 1;\na338d10395 builtin/pack-redundant.c 351) return -1;\na338d10395 builtin/pack-redundant.c 352) } else if (pl_a->remaining_objects->size < pl_b->remaining_objects->size) {\ne4e2c2884e builtin/pack-redundant.c 354) return 1;\ne4e2c2884e builtin/pack-redundant.c 356) return -1;\ne4e2c2884e builtin/pack-redundant.c 361) static void sort_pack_list(struct pack_list **pl)\ne4e2c2884e builtin/pack-redundant.c 365) size_t n = pack_list_size(*pl);\ne4e2c2884e builtin/pack-redundant.c 367) if (n < 2)\ne4e2c2884e builtin/pack-redundant.c 368) return;\ne4e2c2884e builtin/pack-redundant.c 371) ary = xcalloc(n, sizeof(struct pack_list *));\ne4e2c2884e builtin/pack-redundant.c 372) for (n = 0, p = *pl; p; p = p->next)\ne4e2c2884e builtin/pack-redundant.c 373) ary[n++] = p;\na338d10395 builtin/pack-redundant.c 375) QSORT(ary, n, cmp_remaining_objects);\ne4e2c2884e builtin/pack-redundant.c 378) for (i = 0; i < n - 1; i++)\ne4e2c2884e builtin/pack-redundant.c 379) ary[i]->next = ary[i + 1];\ne4e2c2884e builtin/pack-redundant.c 380) ary[n - 1]->next = NULL;\ne4e2c2884e builtin/pack-redundant.c 381) *pl = ary[0];\ne4e2c2884e builtin/pack-redundant.c 383) free(ary);\ne4e2c2884e builtin/pack-redundant.c 389) struct pack_list *pl, *unique = NULL, *non_unique = NULL;\ncb7e0336fc builtin/pack-redundant.c 404) llist_sorted_difference_inplace(missing, pl->remaining_objects);\ne4e2c2884e builtin/pack-redundant.c 408) *min = unique;\ne4e2c2884e builtin/pack-redundant.c 416) unique_pack_objects = llist_copy(all_objects);\ne4e2c2884e builtin/pack-redundant.c 417) llist_sorted_difference_inplace(unique_pack_objects, missing);\ne4e2c2884e builtin/pack-redundant.c 420) pl = non_unique;\ncb7e0336fc builtin/pack-redundant.c 422) llist_sorted_difference_inplace(pl->remaining_objects, unique_pack_objects);\ne4e2c2884e builtin/pack-redundant.c 426) while (non_unique) {\ne4e2c2884e builtin/pack-redundant.c 428) sort_pack_list(&non_unique);\ncb7e0336fc builtin/pack-redundant.c 429) if (non_unique->remaining_objects->size == 0)\ne4e2c2884e builtin/pack-redundant.c 430) break;\ne4e2c2884e builtin/pack-redundant.c 432) pack_list_insert(min, non_unique);\ncb7e0336fc builtin/pack-redundant.c 434) for (pl = non_unique->next; pl && pl->remaining_objects->size > 0;  pl = pl->next)\ncb7e0336fc builtin/pack-redundant.c 435) llist_sorted_difference_inplace(pl->remaining_objects, non_unique->remaining_objects);\ne4e2c2884e builtin/pack-redundant.c 437) non_unique = non_unique->next;\ncb7e0336fc builtin/pack-redundant.c 450) l = pl->remaining_objects->front;\ncb7e0336fc builtin/pack-redundant.c 461) llist_sorted_difference_inplace(all_objects, pl->remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 490) llist_sorted_difference_inplace(all_objects, alt->remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 505) llist_init(&l.remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 514) llist_insert_back(l.remaining_objects, (const struct object_id *)(base + off));\na338d10395 builtin/pack-redundant.c 517) l.all_objects_size = l.remaining_objects->size;\ncb7e0336fc builtin/pack-redundant.c 519) l.unique_objects = llist_copy(l.remaining_objects);\ncb7e0336fc builtin/pack-redundant.c 615) llist_sorted_difference_inplace(pl->remaining_objects, ignore);\n\nbuiltin/range-diff.c\n26c50430dc 78) FREE_AND_NULL(options);\n\nbuiltin/rebase--interactive.c\ne5b1c9d929 builtin/rebase--interactive.c   17) static int edit_todo_file(unsigned flags)\ne5b1c9d929 builtin/rebase--interactive.c   19) const char *todo_file = rebase_path_todo();\ne5b1c9d929 builtin/rebase--interactive.c   20) struct todo_list todo_list = TODO_LIST_INIT,\ne5b1c9d929 builtin/rebase--interactive.c   21) new_todo = TODO_LIST_INIT;\ne5b1c9d929 builtin/rebase--interactive.c   23) if (strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)\ne5b1c9d929 builtin/rebase--interactive.c   24) return error_errno(_(\"could not read '%s'.\"), todo_file);\ne5b1c9d929 builtin/rebase--interactive.c   26) strbuf_stripspace(&todo_list.buf, 1);\ne5b1c9d929 builtin/rebase--interactive.c   27) if (!edit_todo_list(the_repository, &todo_list,\ne5b1c9d929 builtin/rebase--interactive.c   28)     &new_todo, NULL, NULL, flags) &&\ne5b1c9d929 builtin/rebase--interactive.c   29)     todo_list_write_to_file(the_repository, &new_todo, todo_file, NULL, NULL,\ne5b1c9d929 builtin/rebase--interactive.c   31) return error_errno(_(\"could not write '%s'\"), todo_file);\ne5b1c9d929 builtin/rebase--interactive.c   33) todo_list_release(&todo_list);\ne5b1c9d929 builtin/rebase--interactive.c   34) todo_list_release(&new_todo);\ne5b1c9d929 builtin/rebase--interactive.c   36) return 0;\n4d55dfd767 builtin/rebase--interactive.c   39) static int transform_todo_file(unsigned flags)\n4d55dfd767 builtin/rebase--interactive.c   41) const char *todo_file = rebase_path_todo();\n4d55dfd767 builtin/rebase--interactive.c   42) struct todo_list todo_list = TODO_LIST_INIT;\n4d55dfd767 builtin/rebase--interactive.c   45) if (strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)\n4d55dfd767 builtin/rebase--interactive.c   46) return error_errno(_(\"could not read '%s'.\"), todo_file);\n4d55dfd767 builtin/rebase--interactive.c   48) if (todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf,\n4d55dfd767 builtin/rebase--interactive.c   50) todo_list_release(&todo_list);\n4d55dfd767 builtin/rebase--interactive.c   51) return error(_(\"unusable todo list: '%s'\"), todo_file);\n4d55dfd767 builtin/rebase--interactive.c   54) res = todo_list_write_to_file(the_repository, &todo_list, todo_file,\n4d55dfd767 builtin/rebase--interactive.c   56) todo_list_release(&todo_list);\n4d55dfd767 builtin/rebase--interactive.c   58) if (res)\n4d55dfd767 builtin/rebase--interactive.c   59) return error_errno(_(\"could not write '%s'.\"), todo_file);\n4d55dfd767 builtin/rebase--interactive.c   60) return 0;\n0566a4f68e builtin/rebase--interactive.c  121) struct todo_list todo_list = TODO_LIST_INIT;\n0566a4f68e builtin/rebase--interactive.c  147) ret = sequencer_make_script(the_repository, &todo_list.buf,\nc1c074e0cc builtin/rebase--interactive.c  155) if (todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf,\nc1c074e0cc builtin/rebase--interactive.c  159) ret = complete_action(the_repository, opts, flags, shortrevisions, onto_name,\n0566a4f68e builtin/rebase--interactive.c  165) todo_list_release(&todo_list);\n8414c890aa builtin/rebase--interactive.c  269) if (cmd && *cmd) {\n8414c890aa builtin/rebase--interactive.c  270) string_list_split(&commands, cmd, '\\n', -1);\n8414c890aa builtin/rebase--interactive.c  271) if (strlen(commands.items[commands.nr - 1].string) == 0)\n8414c890aa builtin/rebase--interactive.c  272) --commands.nr;\ne5b1c9d929 builtin/rebase--interactive.c  294) ret = edit_todo_file(flags);\n4d55dfd767 builtin/rebase--interactive.c  307) ret = transform_todo_file(flags);\nc27b32f0ec builtin/rebase--interactive.c  310) ret = check_todo_list_from_file(the_repository);\nfebebd99b6 builtin/rebase--interactive.c  313) ret = rearrange_squash_in_todo_file(the_repository);\n8414c890aa builtin/rebase--interactive.c  316) ret = sequencer_add_exec_commands(the_repository, &commands);\n\nbuiltin/rebase.c\nb6b4172bfb  423) if (repo_read_index_unmerged(the_repository) < 0) {\ne1ff0a32e4 1236) if (repo_read_index(the_repository) < 0)\n1b0d968b34 1241) repo_update_index_if_able(the_repository, &lock_file);\ne1ff0a32e4 1593) if (repo_read_index(the_repository) < 0)\n1b0d968b34 1603) repo_update_index_if_able(the_repository, &lock_file);\ne1ff0a32e4 1648) repo_read_index(the_repository) < 0)\n\nbuiltin/replace.c\n4478671442 builtin/replace.c 298) if (index_fd(the_repository->index, oid, fd, &st, type, NULL, flags) < 0)\n\nbuiltin/stash.c\nf6bbd78127 builtin/stash--helper.c  117) static void free_stash_info(struct stash_info *info)\nf6bbd78127 builtin/stash--helper.c  119) strbuf_release(&info->revision);\nf6bbd78127 builtin/stash--helper.c  120) }\nf6bbd78127 builtin/stash--helper.c  122) static void assert_stash_like(struct stash_info *info, const char *revision)\nf6bbd78127 builtin/stash--helper.c  124) if (get_oidf(&info->b_commit, \"%s^1\", revision) ||\nf6bbd78127 builtin/stash--helper.c  125)     get_oidf(&info->w_tree, \"%s:\", revision) ||\nf6bbd78127 builtin/stash--helper.c  126)     get_oidf(&info->b_tree, \"%s^1:\", revision) ||\nf6bbd78127 builtin/stash--helper.c  127)     get_oidf(&info->i_tree, \"%s^2:\", revision))\nf6bbd78127 builtin/stash--helper.c  128) die(_(\"'%s' is not a stash-like commit\"), revision);\nf6bbd78127 builtin/stash--helper.c  129) }\nf6bbd78127 builtin/stash--helper.c  131) static int get_stash_info(struct stash_info *info, int argc, const char **argv)\nf6bbd78127 builtin/stash--helper.c  137) const char *commit = NULL;\nf6bbd78127 builtin/stash--helper.c  139) struct strbuf symbolic = STRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  141) if (argc > 1) {\nf6bbd78127 builtin/stash--helper.c  143) struct strbuf refs_msg = STRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  145) for (i = 0; i < argc; i++)\nf6bbd78127 builtin/stash--helper.c  146) strbuf_addf(&refs_msg, \" '%s'\", argv[i]);\nf6bbd78127 builtin/stash--helper.c  148) fprintf_ln(stderr, _(\"Too many revisions specified:%s\"),\nf6bbd78127 builtin/stash--helper.c  150) strbuf_release(&refs_msg);\nf6bbd78127 builtin/stash--helper.c  152) return -1;\nf6bbd78127 builtin/stash--helper.c  155) if (argc == 1)\nf6bbd78127 builtin/stash--helper.c  156) commit = argv[0];\nf6bbd78127 builtin/stash--helper.c  158) strbuf_init(&info->revision, 0);\nf6bbd78127 builtin/stash--helper.c  159) if (!commit) {\nf6bbd78127 builtin/stash--helper.c  160) if (!ref_exists(ref_stash)) {\nf6bbd78127 builtin/stash--helper.c  161) free_stash_info(info);\nf6bbd78127 builtin/stash--helper.c  162) fprintf_ln(stderr, _(\"No stash entries found.\"));\nf6bbd78127 builtin/stash--helper.c  163) return -1;\nf6bbd78127 builtin/stash--helper.c  166) strbuf_addf(&info->revision, \"%s@{0}\", ref_stash);\nf6bbd78127 builtin/stash--helper.c  167) } else if (strspn(commit, \"0123456789\") == strlen(commit)) {\nf6bbd78127 builtin/stash--helper.c  168) strbuf_addf(&info->revision, \"%s@{%s}\", ref_stash, commit);\nf6bbd78127 builtin/stash--helper.c  170) strbuf_addstr(&info->revision, commit);\nf6bbd78127 builtin/stash--helper.c  173) revision = info->revision.buf;\nf6bbd78127 builtin/stash--helper.c  175) if (get_oid(revision, &info->w_commit)) {\nf6bbd78127 builtin/stash--helper.c  176) error(_(\"%s is not a valid reference\"), revision);\nf6bbd78127 builtin/stash--helper.c  177) free_stash_info(info);\nf6bbd78127 builtin/stash--helper.c  178) return -1;\nf6bbd78127 builtin/stash--helper.c  181) assert_stash_like(info, revision);\nf6bbd78127 builtin/stash--helper.c  183) info->has_u = !get_oidf(&info->u_tree, \"%s^3:\", revision);\nf6bbd78127 builtin/stash--helper.c  185) end_of_rev = strchrnul(revision, '@');\nf6bbd78127 builtin/stash--helper.c  186) strbuf_add(&symbolic, revision, end_of_rev - revision);\nf6bbd78127 builtin/stash--helper.c  188) ret = dwim_ref(symbolic.buf, symbolic.len, &dummy, &expanded_ref);\nf6bbd78127 builtin/stash--helper.c  189) strbuf_release(&symbolic);\nf6bbd78127 builtin/stash--helper.c  190) switch (ret) {\nf6bbd78127 builtin/stash--helper.c  192) info->is_stash_ref = 0;\nf6bbd78127 builtin/stash--helper.c  193) break;\nf6bbd78127 builtin/stash--helper.c  195) info->is_stash_ref = !strcmp(expanded_ref, ref_stash);\nf6bbd78127 builtin/stash--helper.c  196) break;\nf6bbd78127 builtin/stash--helper.c  198) free_stash_info(info);\nf6bbd78127 builtin/stash--helper.c  201) free(expanded_ref);\nf6bbd78127 builtin/stash--helper.c  202) return !(ret == 0 || ret == 1);\ncdca49bc4c builtin/stash--helper.c  205) static int do_clear_stash(void)\ncdca49bc4c builtin/stash--helper.c  208) if (get_oid(ref_stash, &obj))\ncdca49bc4c builtin/stash--helper.c  209) return 0;\ncdca49bc4c builtin/stash--helper.c  211) return delete_ref(NULL, ref_stash, &obj, 0);\ncdca49bc4c builtin/stash--helper.c  214) static int clear_stash(int argc, const char **argv, const char *prefix)\ncdca49bc4c builtin/stash--helper.c  216) struct option options[] = {\ncdca49bc4c builtin/stash--helper.c  220) argc = parse_options(argc, argv, prefix, options,\ncdca49bc4c builtin/stash--helper.c  224) if (argc)\ncdca49bc4c builtin/stash--helper.c  225) return error(_(\"git stash clear with parameters is \"\ncdca49bc4c builtin/stash--helper.c  228) return do_clear_stash();\nf6bbd78127 builtin/stash--helper.c  231) static int reset_tree(struct object_id *i_tree, int update, int reset)\nf6bbd78127 builtin/stash--helper.c  233) int nr_trees = 1;\nf6bbd78127 builtin/stash--helper.c  237) struct lock_file lock_file = LOCK_INIT;\nf6bbd78127 builtin/stash--helper.c  239) read_cache_preload(NULL);\nf6bbd78127 builtin/stash--helper.c  240) if (refresh_cache(REFRESH_QUIET))\nf6bbd78127 builtin/stash--helper.c  241) return -1;\nf6bbd78127 builtin/stash--helper.c  243) hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);\nf6bbd78127 builtin/stash--helper.c  245) memset(&opts, 0, sizeof(opts));\nf6bbd78127 builtin/stash--helper.c  247) tree = parse_tree_indirect(i_tree);\nf6bbd78127 builtin/stash--helper.c  248) if (parse_tree(tree))\nf6bbd78127 builtin/stash--helper.c  249) return -1;\nf6bbd78127 builtin/stash--helper.c  251) init_tree_desc(t, tree->buffer, tree->size);\nf6bbd78127 builtin/stash--helper.c  253) opts.head_idx = 1;\nf6bbd78127 builtin/stash--helper.c  254) opts.src_index = &the_index;\nf6bbd78127 builtin/stash--helper.c  255) opts.dst_index = &the_index;\nf6bbd78127 builtin/stash--helper.c  256) opts.merge = 1;\nf6bbd78127 builtin/stash--helper.c  257) opts.reset = reset;\nf6bbd78127 builtin/stash--helper.c  258) opts.update = update;\nf6bbd78127 builtin/stash--helper.c  259) opts.fn = oneway_merge;\nf6bbd78127 builtin/stash--helper.c  261) if (unpack_trees(nr_trees, t, &opts))\nf6bbd78127 builtin/stash--helper.c  262) return -1;\nf6bbd78127 builtin/stash--helper.c  264) if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\nf6bbd78127 builtin/stash--helper.c  265) return error(_(\"unable to write new index file\"));\nf6bbd78127 builtin/stash--helper.c  267) return 0;\nf6bbd78127 builtin/stash--helper.c  270) static int diff_tree_binary(struct strbuf *out, struct object_id *w_commit)\nf6bbd78127 builtin/stash--helper.c  272) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  273) const char *w_commit_hex = oid_to_hex(w_commit);\nf6bbd78127 builtin/stash--helper.c  279) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  280) argv_array_pushl(&cp.args, \"diff-tree\", \"--binary\", NULL);\nf6bbd78127 builtin/stash--helper.c  281) argv_array_pushf(&cp.args, \"%s^2^..%s^2\", w_commit_hex, w_commit_hex);\nf6bbd78127 builtin/stash--helper.c  283) return pipe_command(&cp, NULL, 0, out, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  286) static int apply_cached(struct strbuf *out)\nf6bbd78127 builtin/stash--helper.c  288) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  295) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  296) argv_array_pushl(&cp.args, \"apply\", \"--cached\", NULL);\nf6bbd78127 builtin/stash--helper.c  297) return pipe_command(&cp, out->buf, out->len, NULL, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  300) static int reset_head(void)\nf6bbd78127 builtin/stash--helper.c  302) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  308) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  309) argv_array_push(&cp.args, \"reset\");\nf6bbd78127 builtin/stash--helper.c  311) return run_command(&cp);\n1f5a011d90 builtin/stash--helper.c  314) static void add_diff_to_buf(struct diff_queue_struct *q,\n1f5a011d90 builtin/stash--helper.c  320) for (i = 0; i < q->nr; i++) {\n1f5a011d90 builtin/stash--helper.c  321) strbuf_addstr(data, q->queue[i]->one->path);\n1f5a011d90 builtin/stash--helper.c  328) strbuf_addch(data, '\\0');\n1f5a011d90 builtin/stash--helper.c  330) }\nf6bbd78127 builtin/stash--helper.c  332) static int get_newly_staged(struct strbuf *out, struct object_id *c_tree)\nf6bbd78127 builtin/stash--helper.c  334) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  335) const char *c_tree_hex = oid_to_hex(c_tree);\nf6bbd78127 builtin/stash--helper.c  341) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  342) argv_array_pushl(&cp.args, \"diff-index\", \"--cached\", \"--name-only\",\nf6bbd78127 builtin/stash--helper.c  344) argv_array_push(&cp.args, c_tree_hex);\nf6bbd78127 builtin/stash--helper.c  345) return pipe_command(&cp, NULL, 0, out, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  348) static int update_index(struct strbuf *out)\nf6bbd78127 builtin/stash--helper.c  350) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  356) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  357) argv_array_pushl(&cp.args, \"update-index\", \"--add\", \"--stdin\", NULL);\nf6bbd78127 builtin/stash--helper.c  358) return pipe_command(&cp, out->buf, out->len, NULL, 0, NULL, 0);\nf6bbd78127 builtin/stash--helper.c  361) static int restore_untracked(struct object_id *u_tree)\nf6bbd78127 builtin/stash--helper.c  364) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  371) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  372) argv_array_push(&cp.args, \"read-tree\");\nf6bbd78127 builtin/stash--helper.c  373) argv_array_push(&cp.args, oid_to_hex(u_tree));\nf6bbd78127 builtin/stash--helper.c  374) argv_array_pushf(&cp.env_array, \"GIT_INDEX_FILE=%s\",\nf6bbd78127 builtin/stash--helper.c  376) if (run_command(&cp)) {\nf6bbd78127 builtin/stash--helper.c  377) remove_path(stash_index_path.buf);\nf6bbd78127 builtin/stash--helper.c  378) return -1;\nf6bbd78127 builtin/stash--helper.c  381) child_process_init(&cp);\nf6bbd78127 builtin/stash--helper.c  382) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  383) argv_array_pushl(&cp.args, \"checkout-index\", \"--all\", NULL);\nf6bbd78127 builtin/stash--helper.c  384) argv_array_pushf(&cp.env_array, \"GIT_INDEX_FILE=%s\",\nf6bbd78127 builtin/stash--helper.c  387) res = run_command(&cp);\nf6bbd78127 builtin/stash--helper.c  388) remove_path(stash_index_path.buf);\nf6bbd78127 builtin/stash--helper.c  389) return res;\nf6bbd78127 builtin/stash--helper.c  392) static int do_apply_stash(const char *prefix, struct stash_info *info,\nf6bbd78127 builtin/stash--helper.c  396) int has_index = index;\nf6bbd78127 builtin/stash--helper.c  403) read_cache_preload(NULL);\nf6bbd78127 builtin/stash--helper.c  404) if (refresh_cache(REFRESH_QUIET))\nf6bbd78127 builtin/stash--helper.c  405) return -1;\nf6bbd78127 builtin/stash--helper.c  407) if (write_cache_as_tree(&c_tree, 0, NULL) || reset_tree(&c_tree, 0, 0))\nf6bbd78127 builtin/stash--helper.c  408) return error(_(\"cannot apply a stash in the middle of a merge\"));\nf6bbd78127 builtin/stash--helper.c  410) if (index) {\nf6bbd78127 builtin/stash--helper.c  411) if (oideq(&info->b_tree, &info->i_tree) ||\nf6bbd78127 builtin/stash--helper.c  412)     oideq(&c_tree, &info->i_tree)) {\nf6bbd78127 builtin/stash--helper.c  413) has_index = 0;\nf6bbd78127 builtin/stash--helper.c  415) struct strbuf out = STRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  417) if (diff_tree_binary(&out, &info->w_commit)) {\nf6bbd78127 builtin/stash--helper.c  418) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  419) return error(_(\"could not generate diff %s^!.\"),\nf6bbd78127 builtin/stash--helper.c  423) ret = apply_cached(&out);\nf6bbd78127 builtin/stash--helper.c  424) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  425) if (ret)\nf6bbd78127 builtin/stash--helper.c  426) return error(_(\"conflicts in index.\"\nf6bbd78127 builtin/stash--helper.c  429) discard_cache();\nf6bbd78127 builtin/stash--helper.c  430) read_cache();\nf6bbd78127 builtin/stash--helper.c  431) if (write_cache_as_tree(&index_tree, 0, NULL))\nf6bbd78127 builtin/stash--helper.c  432) return error(_(\"could not save index tree\"));\nf6bbd78127 builtin/stash--helper.c  434) reset_head();\nf6bbd78127 builtin/stash--helper.c  438) if (info->has_u && restore_untracked(&info->u_tree))\nf6bbd78127 builtin/stash--helper.c  439) return error(_(\"could not restore untracked files from stash\"));\nb6b4172bfb builtin/stash.c          441) init_merge_options(&o, the_repository);\nf6bbd78127 builtin/stash--helper.c  443) o.branch1 = \"Updated upstream\";\nf6bbd78127 builtin/stash--helper.c  444) o.branch2 = \"Stashed changes\";\nf6bbd78127 builtin/stash--helper.c  446) if (oideq(&info->b_tree, &c_tree))\nf6bbd78127 builtin/stash--helper.c  447) o.branch1 = \"Version stash was based on\";\nf6bbd78127 builtin/stash--helper.c  449) if (quiet)\nf6bbd78127 builtin/stash--helper.c  450) o.verbosity = 0;\nf6bbd78127 builtin/stash--helper.c  452) if (o.verbosity >= 3)\nf6bbd78127 builtin/stash--helper.c  453) printf_ln(_(\"Merging %s with %s\"), o.branch1, o.branch2);\nf6bbd78127 builtin/stash--helper.c  455) bases[0] = &info->b_tree;\nf6bbd78127 builtin/stash--helper.c  457) ret = merge_recursive_generic(&o, &c_tree, &info->w_tree, 1, bases,\nf6bbd78127 builtin/stash--helper.c  459) if (ret) {\nf6bbd78127 builtin/stash--helper.c  460) rerere(0);\nf6bbd78127 builtin/stash--helper.c  462) if (index)\nf6bbd78127 builtin/stash--helper.c  463) fprintf_ln(stderr, _(\"Index was not unstashed.\"));\nf6bbd78127 builtin/stash--helper.c  465) return ret;\nf6bbd78127 builtin/stash--helper.c  468) if (has_index) {\nf6bbd78127 builtin/stash--helper.c  469) if (reset_tree(&index_tree, 0, 0))\nf6bbd78127 builtin/stash--helper.c  470) return -1;\nf6bbd78127 builtin/stash--helper.c  472) struct strbuf out = STRBUF_INIT;\nf6bbd78127 builtin/stash--helper.c  474) if (get_newly_staged(&out, &c_tree)) {\nf6bbd78127 builtin/stash--helper.c  475) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  476) return -1;\nf6bbd78127 builtin/stash--helper.c  479) if (reset_tree(&c_tree, 0, 1)) {\nf6bbd78127 builtin/stash--helper.c  480) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  481) return -1;\nf6bbd78127 builtin/stash--helper.c  484) ret = update_index(&out);\nf6bbd78127 builtin/stash--helper.c  485) strbuf_release(&out);\nf6bbd78127 builtin/stash--helper.c  486) if (ret)\nf6bbd78127 builtin/stash--helper.c  487) return -1;\nf6bbd78127 builtin/stash--helper.c  489) discard_cache();\nf6bbd78127 builtin/stash--helper.c  492) if (quiet) {\nf6bbd78127 builtin/stash--helper.c  493) if (refresh_cache(REFRESH_QUIET))\nf6bbd78127 builtin/stash--helper.c  494) warning(\"could not refresh index\");\nf6bbd78127 builtin/stash--helper.c  496) struct child_process cp = CHILD_PROCESS_INIT;\nf6bbd78127 builtin/stash--helper.c  503) cp.git_cmd = 1;\nf6bbd78127 builtin/stash--helper.c  504) cp.dir = prefix;\nf6bbd78127 builtin/stash--helper.c  505) argv_array_push(&cp.args, \"status\");\nf6bbd78127 builtin/stash--helper.c  506) run_command(&cp);\nf6bbd78127 builtin/stash--helper.c  509) return 0;\nf6bbd78127 builtin/stash--helper.c  512) static int apply_stash(int argc, const char **argv, const char *prefix)\nf6bbd78127 builtin/stash--helper.c  515) int quiet = 0;\nf6bbd78127 builtin/stash--helper.c  516) int index = 0;\nf6bbd78127 builtin/stash--helper.c  518) struct option options[] = {\nf6bbd78127 builtin/stash--helper.c  525) argc = parse_options(argc, argv, prefix, options,\nf6bbd78127 builtin/stash--helper.c  528) if (get_stash_info(&info, argc, argv))\nf6bbd78127 builtin/stash--helper.c  529) return -1;\nf6bbd78127 builtin/stash--helper.c  531) ret = do_apply_stash(prefix, &info, index, quiet);\nf6bbd78127 builtin/stash--helper.c  532) free_stash_info(&info);\nf6bbd78127 builtin/stash--helper.c  533) return ret;\ncdca49bc4c builtin/stash--helper.c  536) static int do_drop_stash(const char *prefix, struct stash_info *info, int quiet)\ncdca49bc4c builtin/stash--helper.c  539) struct child_process cp_reflog = CHILD_PROCESS_INIT;\ncdca49bc4c builtin/stash--helper.c  540) struct child_process cp = CHILD_PROCESS_INIT;\ncdca49bc4c builtin/stash--helper.c  547) cp_reflog.git_cmd = 1;\ncdca49bc4c builtin/stash--helper.c  548) argv_array_pushl(&cp_reflog.args, \"reflog\", \"delete\", \"--updateref\",\ncdca49bc4c builtin/stash--helper.c  550) argv_array_push(&cp_reflog.args, info->revision.buf);\ncdca49bc4c builtin/stash--helper.c  551) ret = run_command(&cp_reflog);\ncdca49bc4c builtin/stash--helper.c  552) if (!ret) {\ncdca49bc4c builtin/stash--helper.c  553) if (!quiet)\ncdca49bc4c builtin/stash--helper.c  554) printf_ln(_(\"Dropped %s (%s)\"), info->revision.buf,\ncdca49bc4c builtin/stash--helper.c  555)   oid_to_hex(&info->w_commit));\ncdca49bc4c builtin/stash--helper.c  557) return error(_(\"%s: Could not drop stash entry\"),\ncdca49bc4c builtin/stash--helper.c  565) cp.git_cmd = 1;\ncdca49bc4c builtin/stash--helper.c  567) cp.no_stdout = 1;\ncdca49bc4c builtin/stash--helper.c  568) argv_array_pushl(&cp.args, \"rev-parse\", \"--verify\", \"--quiet\", NULL);\ncdca49bc4c builtin/stash--helper.c  569) argv_array_pushf(&cp.args, \"%s@{0}\", ref_stash);\ncdca49bc4c builtin/stash--helper.c  570) ret = run_command(&cp);\ncdca49bc4c builtin/stash--helper.c  573) if (ret)\ncdca49bc4c builtin/stash--helper.c  574) do_clear_stash();\ncdca49bc4c builtin/stash--helper.c  576) return 0;\ncdca49bc4c builtin/stash--helper.c  579) static void assert_stash_ref(struct stash_info *info)\ncdca49bc4c builtin/stash--helper.c  581) if (!info->is_stash_ref) {\ncdca49bc4c builtin/stash--helper.c  582) free_stash_info(info);\ncdca49bc4c builtin/stash--helper.c  583) error(_(\"'%s' is not a stash reference\"), info->revision.buf);\ncdca49bc4c builtin/stash--helper.c  584) exit(128);\ncdca49bc4c builtin/stash--helper.c  586) }\ncdca49bc4c builtin/stash--helper.c  588) static int drop_stash(int argc, const char **argv, const char *prefix)\ncdca49bc4c builtin/stash--helper.c  591) int quiet = 0;\ncdca49bc4c builtin/stash--helper.c  593) struct option options[] = {\ncdca49bc4c builtin/stash--helper.c  598) argc = parse_options(argc, argv, prefix, options,\ncdca49bc4c builtin/stash--helper.c  601) if (get_stash_info(&info, argc, argv))\ncdca49bc4c builtin/stash--helper.c  602) return -1;\ncdca49bc4c builtin/stash--helper.c  604) assert_stash_ref(&info);\ncdca49bc4c builtin/stash--helper.c  606) ret = do_drop_stash(prefix, &info, quiet);\ncdca49bc4c builtin/stash--helper.c  607) free_stash_info(&info);\ncdca49bc4c builtin/stash--helper.c  608) return ret;\ne1d01876a4 builtin/stash--helper.c  611) static int pop_stash(int argc, const char **argv, const char *prefix)\ne1d01876a4 builtin/stash--helper.c  614) int index = 0;\ne1d01876a4 builtin/stash--helper.c  615) int quiet = 0;\ne1d01876a4 builtin/stash--helper.c  617) struct option options[] = {\ne1d01876a4 builtin/stash--helper.c  624) argc = parse_options(argc, argv, prefix, options,\ne1d01876a4 builtin/stash--helper.c  627) if (get_stash_info(&info, argc, argv))\ne1d01876a4 builtin/stash--helper.c  628) return -1;\ne1d01876a4 builtin/stash--helper.c  630) assert_stash_ref(&info);\ne1d01876a4 builtin/stash--helper.c  631) if ((ret = do_apply_stash(prefix, &info, index, quiet)))\ne1d01876a4 builtin/stash--helper.c  632) printf_ln(_(\"The stash entry is kept in case \"\ne1d01876a4 builtin/stash--helper.c  635) ret = do_drop_stash(prefix, &info, quiet);\ne1d01876a4 builtin/stash--helper.c  637) free_stash_info(&info);\ne1d01876a4 builtin/stash--helper.c  638) return ret;\nf596f3366c builtin/stash--helper.c  641) static int branch_stash(int argc, const char **argv, const char *prefix)\nf596f3366c builtin/stash--helper.c  644) const char *branch = NULL;\nf596f3366c builtin/stash--helper.c  646) struct child_process cp = CHILD_PROCESS_INIT;\nf596f3366c builtin/stash--helper.c  647) struct option options[] = {\nf596f3366c builtin/stash--helper.c  651) argc = parse_options(argc, argv, prefix, options,\nf596f3366c builtin/stash--helper.c  654) if (!argc) {\nf596f3366c builtin/stash--helper.c  655) fprintf_ln(stderr, _(\"No branch name specified\"));\nf596f3366c builtin/stash--helper.c  656) return -1;\nf596f3366c builtin/stash--helper.c  659) branch = argv[0];\nf596f3366c builtin/stash--helper.c  661) if (get_stash_info(&info, argc - 1, argv + 1))\nf596f3366c builtin/stash--helper.c  662) return -1;\nf596f3366c builtin/stash--helper.c  664) cp.git_cmd = 1;\nf596f3366c builtin/stash--helper.c  665) argv_array_pushl(&cp.args, \"checkout\", \"-b\", NULL);\nf596f3366c builtin/stash--helper.c  666) argv_array_push(&cp.args, branch);\nf596f3366c builtin/stash--helper.c  667) argv_array_push(&cp.args, oid_to_hex(&info.b_commit));\nf596f3366c builtin/stash--helper.c  668) ret = run_command(&cp);\nf596f3366c builtin/stash--helper.c  669) if (!ret)\nf596f3366c builtin/stash--helper.c  670) ret = do_apply_stash(prefix, &info, 1, 0);\nf596f3366c builtin/stash--helper.c  671) if (!ret && info.is_stash_ref)\nf596f3366c builtin/stash--helper.c  672) ret = do_drop_stash(prefix, &info, 0);\nf596f3366c builtin/stash--helper.c  674) free_stash_info(&info);\nf596f3366c builtin/stash--helper.c  676) return ret;\n9b77b07ba4 builtin/stash--helper.c  679) static int list_stash(int argc, const char **argv, const char *prefix)\n9b77b07ba4 builtin/stash--helper.c  681) struct child_process cp = CHILD_PROCESS_INIT;\n9b77b07ba4 builtin/stash--helper.c  682) struct option options[] = {\n9b77b07ba4 builtin/stash--helper.c  686) argc = parse_options(argc, argv, prefix, options,\n9b77b07ba4 builtin/stash--helper.c  690) if (!ref_exists(ref_stash))\n9b77b07ba4 builtin/stash--helper.c  691) return 0;\n9b77b07ba4 builtin/stash--helper.c  693) cp.git_cmd = 1;\n9b77b07ba4 builtin/stash--helper.c  694) argv_array_pushl(&cp.args, \"log\", \"--format=%gd: %gs\", \"-g\",\n9b77b07ba4 builtin/stash--helper.c  696) argv_array_pushv(&cp.args, argv);\n9b77b07ba4 builtin/stash--helper.c  697) argv_array_push(&cp.args, ref_stash);\n9b77b07ba4 builtin/stash--helper.c  698) argv_array_push(&cp.args, \"--\");\n9b77b07ba4 builtin/stash--helper.c  699) return run_command(&cp);\nb4493f269e builtin/stash--helper.c  705) static int git_stash_config(const char *var, const char *value, void *cb)\nb4493f269e builtin/stash--helper.c  707) if (!strcmp(var, \"stash.showstat\")) {\nb4493f269e builtin/stash--helper.c  708) show_stat = git_config_bool(var, value);\nb4493f269e builtin/stash--helper.c  709) return 0;\nb4493f269e builtin/stash--helper.c  711) if (!strcmp(var, \"stash.showpatch\")) {\nb4493f269e builtin/stash--helper.c  712) show_patch = git_config_bool(var, value);\nb4493f269e builtin/stash--helper.c  713) return 0;\nb4493f269e builtin/stash--helper.c  715) return git_default_config(var, value, cb);\nb4493f269e builtin/stash--helper.c  718) static int show_stash(int argc, const char **argv, const char *prefix)\nb4493f269e builtin/stash--helper.c  721) int opts = 0;\nb4493f269e builtin/stash--helper.c  722) int ret = 0;\nb4493f269e builtin/stash--helper.c  725) struct argv_array stash_args = ARGV_ARRAY_INIT;\nb4493f269e builtin/stash--helper.c  726) struct option options[] = {\nb4493f269e builtin/stash--helper.c  730) init_diff_ui_defaults();\nb4493f269e builtin/stash--helper.c  731) git_config(git_diff_ui_config, NULL);\nb4493f269e builtin/stash--helper.c  732) init_revisions(&rev, prefix);\nb4493f269e builtin/stash--helper.c  734) for (i = 1; i < argc; i++) {\nb4493f269e builtin/stash--helper.c  735) if (argv[i][0] != '-')\nb4493f269e builtin/stash--helper.c  736) argv_array_push(&stash_args, argv[i]);\nb4493f269e builtin/stash--helper.c  738) opts++;\nb4493f269e builtin/stash--helper.c  741) ret = get_stash_info(&info, stash_args.argc, stash_args.argv);\nb4493f269e builtin/stash--helper.c  742) argv_array_clear(&stash_args);\nb4493f269e builtin/stash--helper.c  743) if (ret)\nb4493f269e builtin/stash--helper.c  744) return -1;\nb4493f269e builtin/stash--helper.c  750) if (!opts) {\nb4493f269e builtin/stash--helper.c  751) git_config(git_stash_config, NULL);\nb4493f269e builtin/stash--helper.c  752) if (show_stat)\nb4493f269e builtin/stash--helper.c  753) rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT;\nb4493f269e builtin/stash--helper.c  755) if (show_patch)\nb4493f269e builtin/stash--helper.c  756) rev.diffopt.output_format |= DIFF_FORMAT_PATCH;\nb4493f269e builtin/stash--helper.c  758) if (!show_stat && !show_patch) {\nb4493f269e builtin/stash--helper.c  759) free_stash_info(&info);\nb4493f269e builtin/stash--helper.c  760) return 0;\nb4493f269e builtin/stash--helper.c  764) argc = setup_revisions(argc, argv, &rev, NULL);\nb4493f269e builtin/stash--helper.c  765) if (argc > 1) {\nb4493f269e builtin/stash--helper.c  766) free_stash_info(&info);\n51809c70ca builtin/stash.c          767) usage_with_options(git_stash_show_usage, options);\nb4493f269e builtin/stash--helper.c  770) rev.diffopt.flags.recursive = 1;\nb4493f269e builtin/stash--helper.c  771) setup_diff_pager(&rev.diffopt);\nb4493f269e builtin/stash--helper.c  772) diff_tree_oid(&info.b_commit, &info.w_commit, \"\", &rev.diffopt);\nb4493f269e builtin/stash--helper.c  773) log_tree_diff_flush(&rev);\nb4493f269e builtin/stash--helper.c  775) free_stash_info(&info);\nb4493f269e builtin/stash--helper.c  776) return diff_result_code(&rev.diffopt, 0);\n847eb0b0a8 builtin/stash--helper.c  779) static int do_store_stash(const struct object_id *w_commit, const char *stash_msg,\n847eb0b0a8 builtin/stash--helper.c  782) if (!stash_msg)\n847eb0b0a8 builtin/stash--helper.c  783) stash_msg = \"Created via \\\"git stash store\\\".\";\n847eb0b0a8 builtin/stash--helper.c  785) if (update_ref(stash_msg, ref_stash, w_commit, NULL,\n847eb0b0a8 builtin/stash--helper.c  789) if (!quiet) {\n847eb0b0a8 builtin/stash--helper.c  790) fprintf_ln(stderr, _(\"Cannot update %s with %s\"),\n847eb0b0a8 builtin/stash--helper.c  793) return -1;\n847eb0b0a8 builtin/stash--helper.c  796) return 0;\n847eb0b0a8 builtin/stash--helper.c  799) static int store_stash(int argc, const char **argv, const char *prefix)\n847eb0b0a8 builtin/stash--helper.c  801) int quiet = 0;\n847eb0b0a8 builtin/stash--helper.c  802) const char *stash_msg = NULL;\n847eb0b0a8 builtin/stash--helper.c  805) struct option options[] = {\n847eb0b0a8 builtin/stash--helper.c  812) argc = parse_options(argc, argv, prefix, options,\n847eb0b0a8 builtin/stash--helper.c  816) if (argc != 1) {\n847eb0b0a8 builtin/stash--helper.c  817) if (!quiet)\n847eb0b0a8 builtin/stash--helper.c  818) fprintf_ln(stderr, _(\"\\\"git stash store\\\" requires one \"\n847eb0b0a8 builtin/stash--helper.c  820) return -1;\nb6b4172bfb builtin/stash.c          823) if (get_oid_with_context(the_repository,\n847eb0b0a8 builtin/stash--helper.c  826) if (!quiet)\n847eb0b0a8 builtin/stash--helper.c  827) fprintf_ln(stderr, _(\"Cannot update %s with %s\"),\n847eb0b0a8 builtin/stash--helper.c  829) return -1;\n847eb0b0a8 builtin/stash--helper.c  832) return do_store_stash(&obj, stash_msg, quiet);\n1f5a011d90 builtin/stash--helper.c  835) static void add_pathspecs(struct argv_array *args,\n1f5a011d90 builtin/stash--helper.c  839) for (i = 0; i < ps.nr; i++)\n1f5a011d90 builtin/stash--helper.c  840) argv_array_push(args, ps.items[i].match);\n1f5a011d90 builtin/stash--helper.c  841) }\n1f5a011d90 builtin/stash--helper.c  850) static int get_untracked_files(struct pathspec ps, int include_untracked,\n1f5a011d90 builtin/stash--helper.c  855) int found = 0;\n1f5a011d90 builtin/stash--helper.c  859) memset(&dir, 0, sizeof(dir));\n1f5a011d90 builtin/stash--helper.c  860) if (include_untracked != INCLUDE_ALL_FILES)\n1f5a011d90 builtin/stash--helper.c  861) setup_standard_excludes(&dir);\n1f5a011d90 builtin/stash--helper.c  863) seen = xcalloc(ps.nr, 1);\n1f5a011d90 builtin/stash--helper.c  865) max_len = fill_directory(&dir, the_repository->index, &ps);\n1f5a011d90 builtin/stash--helper.c  866) for (i = 0; i < dir.nr; i++) {\n1f5a011d90 builtin/stash--helper.c  867) struct dir_entry *ent = dir.entries[i];\n1f5a011d90 builtin/stash--helper.c  868) if (dir_path_match(&the_index, ent, &ps, max_len, seen)) {\n1f5a011d90 builtin/stash--helper.c  869) found++;\n1f5a011d90 builtin/stash--helper.c  870) strbuf_addstr(untracked_files, ent->name);\n1f5a011d90 builtin/stash--helper.c  872) strbuf_addch(untracked_files, 0);\n1f5a011d90 builtin/stash--helper.c  874) free(ent);\n1f5a011d90 builtin/stash--helper.c  877) free(seen);\n1f5a011d90 builtin/stash--helper.c  878) free(dir.entries);\n1f5a011d90 builtin/stash--helper.c  879) free(dir.ignored);\n1f5a011d90 builtin/stash--helper.c  880) clear_directory(&dir);\n1f5a011d90 builtin/stash--helper.c  881) return found;\n168e6cff5e builtin/stash--helper.c  892) static int check_changes_tracked_files(struct pathspec ps)\n1f5a011d90 builtin/stash--helper.c  899) if (get_oid(\"HEAD\", &dummy))\n1f5a011d90 builtin/stash--helper.c  900) return -1;\n1f5a011d90 builtin/stash--helper.c  902) if (read_cache() < 0)\n1f5a011d90 builtin/stash--helper.c  903) return -1;\n1f5a011d90 builtin/stash--helper.c  905) init_revisions(&rev, NULL);\n1f5a011d90 builtin/stash--helper.c  906) rev.prune_data = ps;\n1f5a011d90 builtin/stash--helper.c  908) rev.diffopt.flags.quick = 1;\n1f5a011d90 builtin/stash--helper.c  909) rev.diffopt.flags.ignore_submodules = 1;\n1f5a011d90 builtin/stash--helper.c  910) rev.abbrev = 0;\n1f5a011d90 builtin/stash--helper.c  912) add_head_to_pending(&rev);\n1f5a011d90 builtin/stash--helper.c  913) diff_setup_done(&rev.diffopt);\n1f5a011d90 builtin/stash--helper.c  915) result = run_diff_index(&rev, 1);\n1f5a011d90 builtin/stash--helper.c  916) if (diff_result_code(&rev.diffopt, result))\n1f5a011d90 builtin/stash--helper.c  917) return 1;\n1f5a011d90 builtin/stash--helper.c  919) object_array_clear(&rev.pending);\n1f5a011d90 builtin/stash--helper.c  920) result = run_diff_files(&rev, 0);\n1f5a011d90 builtin/stash--helper.c  921) if (diff_result_code(&rev.diffopt, result))\n1f5a011d90 builtin/stash--helper.c  922) return 1;\n168e6cff5e builtin/stash--helper.c  924) return 0;\n168e6cff5e builtin/stash--helper.c  932) static int check_changes(struct pathspec ps, int include_untracked,\n168e6cff5e builtin/stash--helper.c  935) int ret = 0;\n168e6cff5e builtin/stash--helper.c  936) if (check_changes_tracked_files(ps))\n168e6cff5e builtin/stash--helper.c  937) ret = 1;\n1f5a011d90 builtin/stash--helper.c  939) if (include_untracked && get_untracked_files(ps, include_untracked,\n168e6cff5e builtin/stash--helper.c  941) ret = 1;\n168e6cff5e builtin/stash--helper.c  943) return ret;\n1f5a011d90 builtin/stash--helper.c  946) static int save_untracked_files(struct stash_info *info, struct strbuf *msg,\n1f5a011d90 builtin/stash--helper.c  949) int ret = 0;\n1f5a011d90 builtin/stash--helper.c  950) struct strbuf untracked_msg = STRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c  951) struct child_process cp_upd_index = CHILD_PROCESS_INIT;\n559edead8f builtin/stash--helper.c  952) struct index_state istate = { NULL };\n1f5a011d90 builtin/stash--helper.c  954) cp_upd_index.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c  955) argv_array_pushl(&cp_upd_index.args, \"update-index\", \"-z\", \"--add\",\n1f5a011d90 builtin/stash--helper.c  957) argv_array_pushf(&cp_upd_index.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c  960) strbuf_addf(&untracked_msg, \"untracked files on %s\\n\", msg->buf);\n1f5a011d90 builtin/stash--helper.c  961) if (pipe_command(&cp_upd_index, files.buf, files.len, NULL, 0,\n1f5a011d90 builtin/stash--helper.c  963) ret = -1;\n1f5a011d90 builtin/stash--helper.c  964) goto done;\n559edead8f builtin/stash--helper.c  967) if (write_index_as_tree(&info->u_tree, &istate, stash_index_path.buf, 0,\n1f5a011d90 builtin/stash--helper.c  969) ret = -1;\n1f5a011d90 builtin/stash--helper.c  970) goto done;\n1f5a011d90 builtin/stash--helper.c  973) if (commit_tree(untracked_msg.buf, untracked_msg.len,\n1f5a011d90 builtin/stash--helper.c  974) &info->u_tree, NULL, &info->u_commit, NULL, NULL)) {\n1f5a011d90 builtin/stash--helper.c  975) ret = -1;\n1f5a011d90 builtin/stash--helper.c  976) goto done;\n559edead8f builtin/stash--helper.c  980) discard_index(&istate);\n1f5a011d90 builtin/stash--helper.c  981) strbuf_release(&untracked_msg);\n1f5a011d90 builtin/stash--helper.c  982) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c  983) return ret;\n1f5a011d90 builtin/stash--helper.c  986) static int stash_patch(struct stash_info *info, struct pathspec ps,\n1f5a011d90 builtin/stash--helper.c  989) int ret = 0;\n1f5a011d90 builtin/stash--helper.c  990) struct child_process cp_read_tree = CHILD_PROCESS_INIT;\n1f5a011d90 builtin/stash--helper.c  991) struct child_process cp_add_i = CHILD_PROCESS_INIT;\n1f5a011d90 builtin/stash--helper.c  992) struct child_process cp_diff_tree = CHILD_PROCESS_INIT;\n559edead8f builtin/stash--helper.c  993) struct index_state istate = { NULL };\n1f5a011d90 builtin/stash--helper.c  995) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c  997) cp_read_tree.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c  998) argv_array_pushl(&cp_read_tree.args, \"read-tree\", \"HEAD\", NULL);\n1f5a011d90 builtin/stash--helper.c  999) argv_array_pushf(&cp_read_tree.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c 1001) if (run_command(&cp_read_tree)) {\n1f5a011d90 builtin/stash--helper.c 1002) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1003) goto done;\n1f5a011d90 builtin/stash--helper.c 1007) cp_add_i.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c 1008) argv_array_pushl(&cp_add_i.args, \"add--interactive\", \"--patch=stash\",\n1f5a011d90 builtin/stash--helper.c 1010) add_pathspecs(&cp_add_i.args, ps);\n1f5a011d90 builtin/stash--helper.c 1011) argv_array_pushf(&cp_add_i.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c 1013) if (run_command(&cp_add_i)) {\n1f5a011d90 builtin/stash--helper.c 1014) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1015) goto done;\n559edead8f builtin/stash--helper.c 1019) if (write_index_as_tree(&info->w_tree, &istate, stash_index_path.buf, 0,\n1f5a011d90 builtin/stash--helper.c 1021) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1022) goto done;\n1f5a011d90 builtin/stash--helper.c 1025) cp_diff_tree.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c 1026) argv_array_pushl(&cp_diff_tree.args, \"diff-tree\", \"-p\", \"HEAD\",\n1f5a011d90 builtin/stash--helper.c 1027)  oid_to_hex(&info->w_tree), \"--\", NULL);\n1f5a011d90 builtin/stash--helper.c 1028) if (pipe_command(&cp_diff_tree, NULL, 0, out_patch, 0, NULL, 0)) {\n1f5a011d90 builtin/stash--helper.c 1029) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1030) goto done;\n1f5a011d90 builtin/stash--helper.c 1033) if (!out_patch->len) {\n9a95010a11 builtin/stash--helper.c 1034) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1035) fprintf_ln(stderr, _(\"No changes selected\"));\n1f5a011d90 builtin/stash--helper.c 1036) ret = 1;\n559edead8f builtin/stash--helper.c 1040) discard_index(&istate);\n1f5a011d90 builtin/stash--helper.c 1041) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c 1042) return ret;\n1f5a011d90 builtin/stash--helper.c 1045) static int stash_working_tree(struct stash_info *info, struct pathspec ps)\n1f5a011d90 builtin/stash--helper.c 1047) int ret = 0;\n1f5a011d90 builtin/stash--helper.c 1049) struct child_process cp_upd_index = CHILD_PROCESS_INIT;\n1f5a011d90 builtin/stash--helper.c 1050) struct strbuf diff_output = STRBUF_INIT;\n559edead8f builtin/stash--helper.c 1051) struct index_state istate = { NULL };\ned5d77f7d3 builtin/stash.c         1053) init_revisions(&rev, NULL);\n1f5a011d90 builtin/stash--helper.c 1055) set_alternate_index_output(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c 1056) if (reset_tree(&info->i_tree, 0, 0)) {\n1f5a011d90 builtin/stash--helper.c 1057) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1058) goto done;\n1f5a011d90 builtin/stash--helper.c 1060) set_alternate_index_output(NULL);\n1f5a011d90 builtin/stash--helper.c 1062) rev.prune_data = ps;\n1f5a011d90 builtin/stash--helper.c 1063) rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;\n1f5a011d90 builtin/stash--helper.c 1064) rev.diffopt.format_callback = add_diff_to_buf;\n1f5a011d90 builtin/stash--helper.c 1065) rev.diffopt.format_callback_data = &diff_output;\n1f5a011d90 builtin/stash--helper.c 1067) if (read_cache_preload(&rev.diffopt.pathspec) < 0) {\n1f5a011d90 builtin/stash--helper.c 1068) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1069) goto done;\n1f5a011d90 builtin/stash--helper.c 1072) add_pending_object(&rev, parse_object(the_repository, &info->b_commit),\n1f5a011d90 builtin/stash--helper.c 1074) if (run_diff_index(&rev, 0)) {\n1f5a011d90 builtin/stash--helper.c 1075) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1076) goto done;\n1f5a011d90 builtin/stash--helper.c 1079) cp_upd_index.git_cmd = 1;\n1f5a011d90 builtin/stash--helper.c 1080) argv_array_pushl(&cp_upd_index.args, \"update-index\", \"-z\", \"--add\",\n1f5a011d90 builtin/stash--helper.c 1082) argv_array_pushf(&cp_upd_index.env_array, \"GIT_INDEX_FILE=%s\",\n1f5a011d90 builtin/stash--helper.c 1085) if (pipe_command(&cp_upd_index, diff_output.buf, diff_output.len,\n1f5a011d90 builtin/stash--helper.c 1087) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1088) goto done;\n559edead8f builtin/stash--helper.c 1091) if (write_index_as_tree(&info->w_tree, &istate, stash_index_path.buf, 0,\n1f5a011d90 builtin/stash--helper.c 1093) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1094) goto done;\n559edead8f builtin/stash--helper.c 1098) discard_index(&istate);\n1f5a011d90 builtin/stash--helper.c 1100) object_array_clear(&rev.pending);\n1f5a011d90 builtin/stash--helper.c 1101) strbuf_release(&diff_output);\n1f5a011d90 builtin/stash--helper.c 1102) remove_path(stash_index_path.buf);\n1f5a011d90 builtin/stash--helper.c 1103) return ret;\n1f5a011d90 builtin/stash--helper.c 1106) static int do_create_stash(struct pathspec ps, struct strbuf *stash_msg_buf,\n1f5a011d90 builtin/stash--helper.c 1111) int ret = 0;\n1f5a011d90 builtin/stash--helper.c 1112) int flags = 0;\n1f5a011d90 builtin/stash--helper.c 1113) int untracked_commit_option = 0;\n1f5a011d90 builtin/stash--helper.c 1114) const char *head_short_sha1 = NULL;\n1f5a011d90 builtin/stash--helper.c 1115) const char *branch_ref = NULL;\n1f5a011d90 builtin/stash--helper.c 1116) const char *branch_name = \"(no branch)\";\n1f5a011d90 builtin/stash--helper.c 1117) struct commit *head_commit = NULL;\n1f5a011d90 builtin/stash--helper.c 1118) struct commit_list *parents = NULL;\n1f5a011d90 builtin/stash--helper.c 1119) struct strbuf msg = STRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c 1120) struct strbuf commit_tree_label = STRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c 1121) struct strbuf untracked_files = STRBUF_INIT;\n1f5a011d90 builtin/stash--helper.c 1123) prepare_fallback_ident(\"git stash\", \"git@stash\");\n1f5a011d90 builtin/stash--helper.c 1125) read_cache_preload(NULL);\n1f5a011d90 builtin/stash--helper.c 1126) refresh_cache(REFRESH_QUIET);\n1f5a011d90 builtin/stash--helper.c 1128) if (get_oid(\"HEAD\", &info->b_commit)) {\n9a95010a11 builtin/stash--helper.c 1129) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1130) fprintf_ln(stderr, _(\"You do not have \"\n1f5a011d90 builtin/stash--helper.c 1132) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1133) goto done;\n1f5a011d90 builtin/stash--helper.c 1135) head_commit = lookup_commit(the_repository, &info->b_commit);\n168e6cff5e builtin/stash--helper.c 1138) if (!check_changes(ps, include_untracked, &untracked_files)) {\n1f5a011d90 builtin/stash--helper.c 1139) ret = 1;\n1f5a011d90 builtin/stash--helper.c 1140) goto done;\n1f5a011d90 builtin/stash--helper.c 1143) branch_ref = resolve_ref_unsafe(\"HEAD\", 0, NULL, &flags);\n1f5a011d90 builtin/stash--helper.c 1144) if (flags & REF_ISSYMREF)\n1f5a011d90 builtin/stash--helper.c 1145) branch_name = strrchr(branch_ref, '/') + 1;\n1f5a011d90 builtin/stash--helper.c 1146) head_short_sha1 = find_unique_abbrev(&head_commit->object.oid,\n1f5a011d90 builtin/stash--helper.c 1148) strbuf_addf(&msg, \"%s: %s \", branch_name, head_short_sha1);\n1f5a011d90 builtin/stash--helper.c 1149) pp_commit_easy(CMIT_FMT_ONELINE, head_commit, &msg);\n1f5a011d90 builtin/stash--helper.c 1151) strbuf_addf(&commit_tree_label, \"index on %s\\n\", msg.buf);\n1f5a011d90 builtin/stash--helper.c 1152) commit_list_insert(head_commit, &parents);\n1f5a011d90 builtin/stash--helper.c 1153) if (write_cache_as_tree(&info->i_tree, 0, NULL) ||\n1f5a011d90 builtin/stash--helper.c 1154)     commit_tree(commit_tree_label.buf, commit_tree_label.len,\n1f5a011d90 builtin/stash--helper.c 1155) &info->i_tree, parents, &info->i_commit, NULL, NULL)) {\n9a95010a11 builtin/stash--helper.c 1156) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1157) fprintf_ln(stderr, _(\"Cannot save the current \"\n1f5a011d90 builtin/stash--helper.c 1159) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1160) goto done;\n168e6cff5e builtin/stash--helper.c 1163) if (include_untracked) {\n1f5a011d90 builtin/stash--helper.c 1164) if (save_untracked_files(info, &msg, untracked_files)) {\n9a95010a11 builtin/stash--helper.c 1165) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1166) fprintf_ln(stderr, _(\"Cannot save \"\n1f5a011d90 builtin/stash--helper.c 1168) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1169) goto done;\n1f5a011d90 builtin/stash--helper.c 1171) untracked_commit_option = 1;\n1f5a011d90 builtin/stash--helper.c 1173) if (patch_mode) {\n9a95010a11 builtin/stash--helper.c 1174) ret = stash_patch(info, ps, patch, quiet);\n1f5a011d90 builtin/stash--helper.c 1175) if (ret < 0) {\n9a95010a11 builtin/stash--helper.c 1176) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1177) fprintf_ln(stderr, _(\"Cannot save the current \"\n1f5a011d90 builtin/stash--helper.c 1179) goto done;\n1f5a011d90 builtin/stash--helper.c 1180) } else if (ret > 0) {\n1f5a011d90 builtin/stash--helper.c 1181) goto done;\n1f5a011d90 builtin/stash--helper.c 1184) if (stash_working_tree(info, ps)) {\n9a95010a11 builtin/stash--helper.c 1185) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1186) fprintf_ln(stderr, _(\"Cannot save the current \"\n1f5a011d90 builtin/stash--helper.c 1188) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1189) goto done;\n1f5a011d90 builtin/stash--helper.c 1193) if (!stash_msg_buf->len)\n1f5a011d90 builtin/stash--helper.c 1194) strbuf_addf(stash_msg_buf, \"WIP on %s\", msg.buf);\n1f5a011d90 builtin/stash--helper.c 1196) strbuf_insertf(stash_msg_buf, 0, \"On %s: \", branch_name);\n1f5a011d90 builtin/stash--helper.c 1202) parents = NULL;\n1f5a011d90 builtin/stash--helper.c 1203) if (untracked_commit_option)\n1f5a011d90 builtin/stash--helper.c 1204) commit_list_insert(lookup_commit(the_repository,\n1f5a011d90 builtin/stash--helper.c 1205)  &info->u_commit),\n1f5a011d90 builtin/stash--helper.c 1207) commit_list_insert(lookup_commit(the_repository, &info->i_commit),\n1f5a011d90 builtin/stash--helper.c 1209) commit_list_insert(head_commit, &parents);\n1f5a011d90 builtin/stash--helper.c 1211) if (commit_tree(stash_msg_buf->buf, stash_msg_buf->len, &info->w_tree,\n9a95010a11 builtin/stash--helper.c 1213) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1214) fprintf_ln(stderr, _(\"Cannot record \"\n1f5a011d90 builtin/stash--helper.c 1216) ret = -1;\n1f5a011d90 builtin/stash--helper.c 1217) goto done;\n1f5a011d90 builtin/stash--helper.c 1221) strbuf_release(&commit_tree_label);\n1f5a011d90 builtin/stash--helper.c 1222) strbuf_release(&msg);\n1f5a011d90 builtin/stash--helper.c 1223) strbuf_release(&untracked_files);\n1f5a011d90 builtin/stash--helper.c 1224) return ret;\n1f5a011d90 builtin/stash--helper.c 1227) static int create_stash(int argc, const char **argv, const char *prefix)\n1f5a011d90 builtin/stash--helper.c 1229) int ret = 0;\n1f5a011d90 builtin/stash--helper.c 1230) struct strbuf stash_msg_buf = STRBUF_INIT;\n51809c70ca builtin/stash.c         1235) strbuf_join_argv(&stash_msg_buf, argc - 1, ++argv, ' ');\n1f5a011d90 builtin/stash--helper.c 1237) memset(&ps, 0, sizeof(ps));\n168e6cff5e builtin/stash--helper.c 1238) if (!check_changes_tracked_files(ps))\n168e6cff5e builtin/stash--helper.c 1239) return 0;\n168e6cff5e builtin/stash--helper.c 1241) if (!(ret = do_create_stash(ps, &stash_msg_buf, 0, 0, &info, NULL, 0)))\n1f5a011d90 builtin/stash--helper.c 1242) printf_ln(\"%s\", oid_to_hex(&info.w_commit));\n1f5a011d90 builtin/stash--helper.c 1244) strbuf_release(&stash_msg_buf);\n168e6cff5e builtin/stash--helper.c 1245) return ret;\nfa38428f76 builtin/stash--helper.c 1248) static int do_push_stash(struct pathspec ps, const char *stash_msg, int quiet,\nfa38428f76 builtin/stash--helper.c 1251) int ret = 0;\nfa38428f76 builtin/stash--helper.c 1253) struct strbuf patch = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1254) struct strbuf stash_msg_buf = STRBUF_INIT;\n168e6cff5e builtin/stash--helper.c 1255) struct strbuf untracked_files = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1257) if (patch_mode && keep_index == -1)\nfa38428f76 builtin/stash--helper.c 1258) keep_index = 1;\nfa38428f76 builtin/stash--helper.c 1260) if (patch_mode && include_untracked) {\nfa38428f76 builtin/stash--helper.c 1261) fprintf_ln(stderr, _(\"Can't use --patch and --include-untracked\"\nfa38428f76 builtin/stash--helper.c 1263) ret = -1;\nfa38428f76 builtin/stash--helper.c 1264) goto done;\nfa38428f76 builtin/stash--helper.c 1267) read_cache_preload(NULL);\nfa38428f76 builtin/stash--helper.c 1268) if (!include_untracked && ps.nr) {\nfa38428f76 builtin/stash--helper.c 1270) char *ps_matched = xcalloc(ps.nr, 1);\nfa38428f76 builtin/stash--helper.c 1272) for (i = 0; i < active_nr; i++)\nfa38428f76 builtin/stash--helper.c 1273) ce_path_match(&the_index, active_cache[i], &ps,\nfa38428f76 builtin/stash--helper.c 1276) if (report_path_error(ps_matched, &ps, NULL)) {\nfa38428f76 builtin/stash--helper.c 1277) fprintf_ln(stderr, _(\"Did you forget to 'git add'?\"));\nfa38428f76 builtin/stash--helper.c 1278) ret = -1;\nfa38428f76 builtin/stash--helper.c 1279) free(ps_matched);\nfa38428f76 builtin/stash--helper.c 1280) goto done;\nfa38428f76 builtin/stash--helper.c 1282) free(ps_matched);\nfa38428f76 builtin/stash--helper.c 1285) if (refresh_cache(REFRESH_QUIET)) {\nfa38428f76 builtin/stash--helper.c 1286) ret = -1;\nfa38428f76 builtin/stash--helper.c 1287) goto done;\n168e6cff5e builtin/stash--helper.c 1290) if (!check_changes(ps, include_untracked, &untracked_files)) {\nfa38428f76 builtin/stash--helper.c 1291) if (!quiet)\nfa38428f76 builtin/stash--helper.c 1292) printf_ln(_(\"No local changes to save\"));\nfa38428f76 builtin/stash--helper.c 1293) goto done;\nfa38428f76 builtin/stash--helper.c 1296) if (!reflog_exists(ref_stash) && do_clear_stash()) {\nfa38428f76 builtin/stash--helper.c 1297) ret = -1;\n9a95010a11 builtin/stash--helper.c 1298) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1299) fprintf_ln(stderr, _(\"Cannot initialize stash\"));\nfa38428f76 builtin/stash--helper.c 1300) goto done;\nfa38428f76 builtin/stash--helper.c 1303) if (stash_msg)\nfa38428f76 builtin/stash--helper.c 1304) strbuf_addstr(&stash_msg_buf, stash_msg);\nfa38428f76 builtin/stash--helper.c 1305) if (do_create_stash(ps, &stash_msg_buf, include_untracked, patch_mode,\nfa38428f76 builtin/stash--helper.c 1307) ret = -1;\nfa38428f76 builtin/stash--helper.c 1308) goto done;\nfa38428f76 builtin/stash--helper.c 1311) if (do_store_stash(&info.w_commit, stash_msg_buf.buf, 1)) {\nfa38428f76 builtin/stash--helper.c 1312) ret = -1;\n9a95010a11 builtin/stash--helper.c 1313) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1314) fprintf_ln(stderr, _(\"Cannot save the current status\"));\nfa38428f76 builtin/stash--helper.c 1315) goto done;\n9a95010a11 builtin/stash--helper.c 1318) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1319) printf_ln(_(\"Saved working directory and index state %s\"),\nfa38428f76 builtin/stash--helper.c 1322) if (!patch_mode) {\nfa38428f76 builtin/stash--helper.c 1323) if (include_untracked && !ps.nr) {\nfa38428f76 builtin/stash--helper.c 1324) struct child_process cp = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1326) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1327) argv_array_pushl(&cp.args, \"clean\", \"--force\",\nfa38428f76 builtin/stash--helper.c 1329) if (include_untracked == INCLUDE_ALL_FILES)\nfa38428f76 builtin/stash--helper.c 1330) argv_array_push(&cp.args, \"-x\");\nfa38428f76 builtin/stash--helper.c 1331) if (run_command(&cp)) {\nfa38428f76 builtin/stash--helper.c 1332) ret = -1;\nfa38428f76 builtin/stash--helper.c 1333) goto done;\nfa38428f76 builtin/stash--helper.c 1336) if (ps.nr) {\nfa38428f76 builtin/stash--helper.c 1337) struct child_process cp_add = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1338) struct child_process cp_diff = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1339) struct child_process cp_apply = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1340) struct strbuf out = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1342) cp_add.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1343) argv_array_push(&cp_add.args, \"add\");\nfa38428f76 builtin/stash--helper.c 1344) if (!include_untracked)\nfa38428f76 builtin/stash--helper.c 1345) argv_array_push(&cp_add.args, \"-u\");\nfa38428f76 builtin/stash--helper.c 1346) if (include_untracked == INCLUDE_ALL_FILES)\nfa38428f76 builtin/stash--helper.c 1347) argv_array_push(&cp_add.args, \"--force\");\nfa38428f76 builtin/stash--helper.c 1348) argv_array_push(&cp_add.args, \"--\");\nfa38428f76 builtin/stash--helper.c 1349) add_pathspecs(&cp_add.args, ps);\nfa38428f76 builtin/stash--helper.c 1350) if (run_command(&cp_add)) {\nfa38428f76 builtin/stash--helper.c 1351) ret = -1;\nfa38428f76 builtin/stash--helper.c 1352) goto done;\nfa38428f76 builtin/stash--helper.c 1355) cp_diff.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1356) argv_array_pushl(&cp_diff.args, \"diff-index\", \"-p\",\nfa38428f76 builtin/stash--helper.c 1359) add_pathspecs(&cp_diff.args, ps);\nfa38428f76 builtin/stash--helper.c 1360) if (pipe_command(&cp_diff, NULL, 0, &out, 0, NULL, 0)) {\nfa38428f76 builtin/stash--helper.c 1361) ret = -1;\nfa38428f76 builtin/stash--helper.c 1362) goto done;\nfa38428f76 builtin/stash--helper.c 1365) cp_apply.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1366) argv_array_pushl(&cp_apply.args, \"apply\", \"--index\",\nfa38428f76 builtin/stash--helper.c 1368) if (pipe_command(&cp_apply, out.buf, out.len, NULL, 0,\nfa38428f76 builtin/stash--helper.c 1370) ret = -1;\nfa38428f76 builtin/stash--helper.c 1371) goto done;\nfa38428f76 builtin/stash--helper.c 1374) struct child_process cp = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1375) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1376) argv_array_pushl(&cp.args, \"reset\", \"--hard\", \"-q\",\nfa38428f76 builtin/stash--helper.c 1378) if (run_command(&cp)) {\nfa38428f76 builtin/stash--helper.c 1379) ret = -1;\nfa38428f76 builtin/stash--helper.c 1380) goto done;\nfa38428f76 builtin/stash--helper.c 1384) if (keep_index == 1 && !is_null_oid(&info.i_tree)) {\nfa38428f76 builtin/stash--helper.c 1385) struct child_process cp_ls = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1386) struct child_process cp_checkout = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1387) struct strbuf out = STRBUF_INIT;\nfa38428f76 builtin/stash--helper.c 1389) if (reset_tree(&info.i_tree, 0, 1)) {\nfa38428f76 builtin/stash--helper.c 1390) ret = -1;\nfa38428f76 builtin/stash--helper.c 1391) goto done;\nfa38428f76 builtin/stash--helper.c 1394) cp_ls.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1395) argv_array_pushl(&cp_ls.args, \"ls-files\", \"-z\",\nfa38428f76 builtin/stash--helper.c 1398) add_pathspecs(&cp_ls.args, ps);\nfa38428f76 builtin/stash--helper.c 1399) if (pipe_command(&cp_ls, NULL, 0, &out, 0, NULL, 0)) {\nfa38428f76 builtin/stash--helper.c 1400) ret = -1;\nfa38428f76 builtin/stash--helper.c 1401) goto done;\nfa38428f76 builtin/stash--helper.c 1404) cp_checkout.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1405) argv_array_pushl(&cp_checkout.args, \"checkout-index\",\nfa38428f76 builtin/stash--helper.c 1407) if (pipe_command(&cp_checkout, out.buf, out.len, NULL,\nfa38428f76 builtin/stash--helper.c 1409) ret = -1;\nfa38428f76 builtin/stash--helper.c 1410) goto done;\nfa38428f76 builtin/stash--helper.c 1413) goto done;\nfa38428f76 builtin/stash--helper.c 1415) struct child_process cp = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1417) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1418) argv_array_pushl(&cp.args, \"apply\", \"-R\", NULL);\nfa38428f76 builtin/stash--helper.c 1420) if (pipe_command(&cp, patch.buf, patch.len, NULL, 0, NULL, 0)) {\n9a95010a11 builtin/stash--helper.c 1421) if (!quiet)\n9a95010a11 builtin/stash--helper.c 1422) fprintf_ln(stderr, _(\"Cannot remove \"\nfa38428f76 builtin/stash--helper.c 1424) ret = -1;\nfa38428f76 builtin/stash--helper.c 1425) goto done;\nfa38428f76 builtin/stash--helper.c 1428) if (keep_index < 1) {\nfa38428f76 builtin/stash--helper.c 1429) struct child_process cp = CHILD_PROCESS_INIT;\nfa38428f76 builtin/stash--helper.c 1431) cp.git_cmd = 1;\nfa38428f76 builtin/stash--helper.c 1432) argv_array_pushl(&cp.args, \"reset\", \"-q\", \"--\", NULL);\nfa38428f76 builtin/stash--helper.c 1433) add_pathspecs(&cp.args, ps);\nfa38428f76 builtin/stash--helper.c 1434) if (run_command(&cp)) {\nfa38428f76 builtin/stash--helper.c 1435) ret = -1;\nfa38428f76 builtin/stash--helper.c 1436) goto done;\nfa38428f76 builtin/stash--helper.c 1439) goto done;\nfa38428f76 builtin/stash--helper.c 1443) strbuf_release(&stash_msg_buf);\nfa38428f76 builtin/stash--helper.c 1444) return ret;\nfa38428f76 builtin/stash--helper.c 1447) static int push_stash(int argc, const char **argv, const char *prefix)\nfa38428f76 builtin/stash--helper.c 1449) int keep_index = -1;\nfa38428f76 builtin/stash--helper.c 1450) int patch_mode = 0;\nfa38428f76 builtin/stash--helper.c 1451) int include_untracked = 0;\nfa38428f76 builtin/stash--helper.c 1452) int quiet = 0;\nfa38428f76 builtin/stash--helper.c 1453) const char *stash_msg = NULL;\nfa38428f76 builtin/stash--helper.c 1455) struct option options[] = {\n51809c70ca builtin/stash.c         1470) if (argc)\n51809c70ca builtin/stash.c         1471) argc = parse_options(argc, argv, prefix, options,\nfa38428f76 builtin/stash--helper.c 1475) parse_pathspec(&ps, 0, PATHSPEC_PREFER_FULL, prefix, argv);\nfa38428f76 builtin/stash--helper.c 1476) return do_push_stash(ps, stash_msg, quiet, keep_index, patch_mode,\ncf5b27d699 builtin/stash--helper.c 1480) static int save_stash(int argc, const char **argv, const char *prefix)\ncf5b27d699 builtin/stash--helper.c 1482) int keep_index = -1;\ncf5b27d699 builtin/stash--helper.c 1483) int patch_mode = 0;\ncf5b27d699 builtin/stash--helper.c 1484) int include_untracked = 0;\ncf5b27d699 builtin/stash--helper.c 1485) int quiet = 0;\ncf5b27d699 builtin/stash--helper.c 1486) int ret = 0;\ncf5b27d699 builtin/stash--helper.c 1487) const char *stash_msg = NULL;\ncf5b27d699 builtin/stash--helper.c 1489) struct strbuf stash_msg_buf = STRBUF_INIT;\ncf5b27d699 builtin/stash--helper.c 1490) struct option options[] = {\ncf5b27d699 builtin/stash--helper.c 1505) argc = parse_options(argc, argv, prefix, options,\ncf5b27d699 builtin/stash--helper.c 1509) if (argc)\ncf5b27d699 builtin/stash--helper.c 1510) stash_msg = strbuf_join_argv(&stash_msg_buf, argc, argv, ' ');\ncf5b27d699 builtin/stash--helper.c 1512) memset(&ps, 0, sizeof(ps));\ncf5b27d699 builtin/stash--helper.c 1513) ret = do_push_stash(ps, stash_msg, quiet, keep_index,\ncf5b27d699 builtin/stash--helper.c 1516) strbuf_release(&stash_msg_buf);\ncf5b27d699 builtin/stash--helper.c 1517) return ret;\nbec65d5b78 builtin/stash.c         1527) return env;\n26799a208f builtin/stash.c         1537) strbuf_trim(&out);\n26799a208f builtin/stash.c         1538) ret = !strcmp(\"true\", out.buf);\n26799a208f builtin/stash.c         1539) strbuf_release(&out);\n26799a208f builtin/stash.c         1555) const char *path = mkpath(\"%s/git-legacy-stash\",\n26799a208f builtin/stash.c         1558) if (sane_execvp(path, (char **)argv) < 0)\n26799a208f builtin/stash.c         1559) die_errno(_(\"could not exec %s\"), path);\nf6bbd78127 builtin/stash--helper.c 1573) index_file = get_index_file();\nf6bbd78127 builtin/stash--helper.c 1574) strbuf_addf(&stash_index_path, \"%s.stash.%\" PRIuMAX, index_file,\n51809c70ca builtin/stash.c         1577) if (!argc)\n51809c70ca builtin/stash.c         1578) return !!push_stash(0, NULL, prefix);\n51809c70ca builtin/stash.c         1579) else if (!strcmp(argv[0], \"apply\"))\nf6bbd78127 builtin/stash--helper.c 1580) return !!apply_stash(argc, argv, prefix);\ncdca49bc4c builtin/stash--helper.c 1581) else if (!strcmp(argv[0], \"clear\"))\ncdca49bc4c builtin/stash--helper.c 1582) return !!clear_stash(argc, argv, prefix);\ncdca49bc4c builtin/stash--helper.c 1583) else if (!strcmp(argv[0], \"drop\"))\ncdca49bc4c builtin/stash--helper.c 1584) return !!drop_stash(argc, argv, prefix);\ne1d01876a4 builtin/stash--helper.c 1585) else if (!strcmp(argv[0], \"pop\"))\ne1d01876a4 builtin/stash--helper.c 1586) return !!pop_stash(argc, argv, prefix);\nf596f3366c builtin/stash--helper.c 1587) else if (!strcmp(argv[0], \"branch\"))\nf596f3366c builtin/stash--helper.c 1588) return !!branch_stash(argc, argv, prefix);\n9b77b07ba4 builtin/stash--helper.c 1589) else if (!strcmp(argv[0], \"list\"))\n9b77b07ba4 builtin/stash--helper.c 1590) return !!list_stash(argc, argv, prefix);\nb4493f269e builtin/stash--helper.c 1591) else if (!strcmp(argv[0], \"show\"))\nb4493f269e builtin/stash--helper.c 1592) return !!show_stash(argc, argv, prefix);\n847eb0b0a8 builtin/stash--helper.c 1593) else if (!strcmp(argv[0], \"store\"))\n847eb0b0a8 builtin/stash--helper.c 1594) return !!store_stash(argc, argv, prefix);\n1f5a011d90 builtin/stash--helper.c 1595) else if (!strcmp(argv[0], \"create\"))\n1f5a011d90 builtin/stash--helper.c 1596) return !!create_stash(argc, argv, prefix);\nfa38428f76 builtin/stash--helper.c 1597) else if (!strcmp(argv[0], \"push\"))\nfa38428f76 builtin/stash--helper.c 1598) return !!push_stash(argc, argv, prefix);\ncf5b27d699 builtin/stash--helper.c 1599) else if (!strcmp(argv[0], \"save\"))\ncf5b27d699 builtin/stash--helper.c 1600) return !!save_stash(argc, argv, prefix);\n51809c70ca builtin/stash.c         1601) else if (*argv[0] != '-')\n51809c70ca builtin/stash.c         1602) usage_msg_opt(xstrfmt(_(\"unknown subcommand: %s\"), argv[0]),\n51809c70ca builtin/stash.c         1605) if (strcmp(argv[0], \"-p\")) {\n51809c70ca builtin/stash.c         1606) while (++i < argc && strcmp(argv[i], \"--\")) {\n51809c70ca builtin/stash.c         1611) if ((strlen(argv[i]) == 2) && *argv[i] == '-' &&\n51809c70ca builtin/stash.c         1612)     strchr(\"akpqu\", argv[i][1]))\n51809c70ca builtin/stash.c         1613) continue;\n51809c70ca builtin/stash.c         1615) if (!strcmp(argv[i], \"--all\") ||\n51809c70ca builtin/stash.c         1616)     !strcmp(argv[i], \"--keep-index\") ||\n51809c70ca builtin/stash.c         1617)     !strcmp(argv[i], \"--no-keep-index\") ||\n51809c70ca builtin/stash.c         1618)     !strcmp(argv[i], \"--patch\") ||\n51809c70ca builtin/stash.c         1619)     !strcmp(argv[i], \"--quiet\") ||\n51809c70ca builtin/stash.c         1620)     !strcmp(argv[i], \"--include-untracked\"))\n51809c70ca builtin/stash.c         1621) continue;\n51809c70ca builtin/stash.c         1628) if (starts_with(argv[i], \"-m\") ||\n51809c70ca builtin/stash.c         1629)     starts_with(argv[i], \"--message=\"))\n51809c70ca builtin/stash.c         1630) continue;\n51809c70ca builtin/stash.c         1632) usage_with_options(git_stash_usage, options);\n51809c70ca builtin/stash.c         1636) argv_array_push(&args, \"push\");\n51809c70ca builtin/stash.c         1637) argv_array_pushv(&args, argv);\n51809c70ca builtin/stash.c         1638) return !!push_stash(args.argc, args.argv, prefix);\n\nbuiltin/update-index.c\n08339886b9 builtin/update-index.c  895) static enum parse_opt_result stdin_callback(\n9b4ae5190a builtin/update-index.c  902) BUG_ON_OPT_ARG(arg);\n08339886b9 builtin/update-index.c  910) static enum parse_opt_result unresolve_callback(\n9b4ae5190a builtin/update-index.c  918) BUG_ON_OPT_ARG(arg);\n08339886b9 builtin/update-index.c  931) static enum parse_opt_result reupdate_callback(\n9b4ae5190a builtin/update-index.c  939) BUG_ON_OPT_ARG(arg);\n\nbuiltin/upload-archive.c\n6da1f1a920 builtin/upload-archive.c  86) register_allowed_protocol_version(protocol_v0);\n\ncommit-graph.c\n97b202471c  885) for_each_object_in_pack(p, add_packed_commits, &oids,\n97b202471c  932) for_each_packed_object(add_packed_commits, &oids,\n\nconfig.c\n06800238c6 1684) worktree_config = mkpathdup(\"%s/config.worktree\", opts->git_dir);\n06800238c6 1709) ret += git_config_from_file(fn, worktree_config, data);\n8f7c7f5555 2147) int repo_config_set_gently(struct repository *r,\n8f7c7f5555 2150) char *path = repo_git_path(r, \"config\");\n8f7c7f5555 2151) int ret = git_config_set_multivar_in_file_gently(path, key, value, NULL, 0);\n8f7c7f5555 2152) free(path);\n8f7c7f5555 2153) return ret;\n8f7c7f5555 2156) void repo_config_set(struct repository *r, const char *key, const char *value)\n8f7c7f5555 2158) if (!repo_config_set_gently(r, key, value))\n8f7c7f5555 2159) return;\n8f7c7f5555 2160) if (value)\n8f7c7f5555 2161) die(_(\"could not set '%s' to '%s'\"), key, value);\n8f7c7f5555 2163) die(_(\"could not unset '%s'\"), key);\n8f7c7f5555 2166) int repo_config_set_worktree_gently(struct repository *r,\n8f7c7f5555 2172) path = get_worktree_config(r);\n8f7c7f5555 2173) if (!path)\n8f7c7f5555 2174) return CONFIG_INVALID_FILE;\n8f7c7f5555 2175) ret = git_config_set_multivar_in_file_gently(path, key, value, NULL, 0);\n8f7c7f5555 2176) free(path);\n8f7c7f5555 2177) return ret;\n\nconnect.c\n6da1f1a920 1085) strbuf_addch(&request, '\\0');\n6da1f1a920 1086) strbuf_addf(&request, \"%s%c\", version_advert->buf, '\\0');\n6da1f1a920 1103) if (variant == VARIANT_SSH) {\n6da1f1a920 1106) argv_array_pushf(env, GIT_PROTOCOL_ENVIRONMENT \"=%s\",\n6da1f1a920 1194) push_ssh_options(&detect.args, &detect.env_array, VARIANT_SSH,\n6da1f1a920 1202) push_ssh_options(&conn->args, &conn->env_array, variant, port,\n6da1f1a920 1241) conn = git_connect_git(fd, hostandport, path, prog,\n6da1f1a920 1285) fill_ssh_args(conn, ssh_host, port, &version_advert,\n\ndate.c\nacdd37769d  113) die(\"Timestamp too large for this system: %\"PRItime, time);\n6943bd42fb  137) gettimeofday(now, NULL);\nacdd37769d  245) hide.date = 1;\nacdd37769d  926) return DATE_HUMAN;\n86177eb5c4  943) if (isatty(1) || pager_in_use())\n86177eb5c4  944) format = p;\n86177eb5c4  946) format = \"default\";\n\ndiff-no-index.c\n963389f6e7 268) if (implicit_no_index)\n963389f6e7 269) warning(_(\"Not a git repository. Use --no-index to \"\n963389f6e7 271) usage_with_options(diff_no_index_usage, options);\n963389f6e7 305) return 1;\n\ndiff.c\n0eb03c4cd0 4745) width = strtoul(value, &end, 10);\n0eb03c4cd0 4746) if (*end == ',')\n0eb03c4cd0 4747) name_width = strtoul(end+1, &end, 10);\n0eb03c4cd0 4748) if (*end == ',')\n0eb03c4cd0 4749) count = strtoul(end+1, &end, 10);\n0eb03c4cd0 4750) if (*end)\n0eb03c4cd0 4751) return error(_(\"invalid --stat value: %s\"), value);\n0eb03c4cd0 4753) } else if (!strcmp(opt->long_name, \"stat-width\")) {\n0eb03c4cd0 4754) width = strtoul(value, &end, 10);\n0eb03c4cd0 4755) if (*end)\n0eb03c4cd0 4756) return error(_(\"%s expects a numerical value\"),\n0eb03c4cd0 4758) } else if (!strcmp(opt->long_name, \"stat-name-width\")) {\n0eb03c4cd0 4759) name_width = strtoul(value, &end, 10);\n0eb03c4cd0 4760) if (*end)\n0eb03c4cd0 4761) return error(_(\"%s expects a numerical value\"),\n0eb03c4cd0 4763) } else if (!strcmp(opt->long_name, \"stat-graph-width\")) {\n0eb03c4cd0 4764) graph_width = strtoul(value, &end, 10);\n0eb03c4cd0 4765) if (*end)\n0eb03c4cd0 4766) return error(_(\"%s expects a numerical value\"),\n0eb03c4cd0 4768) } else if (!strcmp(opt->long_name, \"stat-count\")) {\n0eb03c4cd0 4769) count = strtoul(value, &end, 10);\n0eb03c4cd0 4770) if (*end)\n0eb03c4cd0 4771) return error(_(\"%s expects a numerical value\"),\nb74a81799d 4836) static int diff_opt_diff_filter(const struct option *option,\nb74a81799d 4839) struct diff_options *opt = option->value;\nb74a81799d 4842) BUG_ON_OPT_NEG(unset);\nb74a81799d 4873) return error(_(\"unknown change class '%c' in --diff-filter=%s\"),\n8b70e41773 4889) static int diff_opt_ws_error_highlight(const struct option *option,\n8b70e41773 4892) struct diff_options *opt = option->value;\n8b70e41773 4895) BUG_ON_OPT_NEG(unset);\n8b70e41773 4896) if (val < 0)\n8b70e41773 4897) return error(\"unknown value after ws-error-highlight=%.*s\",\n8b70e41773 4900) return 0;\n5866e9ce9a 4903) static int diff_opt_find_object(const struct option *option,\n5866e9ce9a 4906) struct diff_options *opt = option->value;\n5866e9ce9a 4909) BUG_ON_OPT_NEG(unset);\n5866e9ce9a 4911) return error(_(\"unable to resolve '%s'\"), arg);\n5866e9ce9a 4920) return 0;\nb065b66077 4923) static int diff_opt_anchored(const struct option *opt,\nb065b66077 4926) struct diff_options *options = opt->value;\nb065b66077 4928) BUG_ON_OPT_NEG(unset);\nb065b66077 4929) options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);\nb065b66077 4930) ALLOC_GROW(options->anchors, options->anchors_nr + 1,\nb065b66077 4932) options->anchors[options->anchors_nr++] = xstrdup(arg);\nb065b66077 4933) return 0;\n6d0300b2e3 4936) static int diff_opt_binary(const struct option *opt,\n6d0300b2e3 4939) struct diff_options *options = opt->value;\n6d0300b2e3 4941) BUG_ON_OPT_NEG(unset);\n6d0300b2e3 4942) BUG_ON_OPT_ARG(arg);\n6d0300b2e3 4943) enable_patch_output(&options->output_format);\n6d0300b2e3 4944) options->flags.binary = 1;\n6d0300b2e3 4945) return 0;\nb9b760ed1c 4948) static int diff_opt_break_rewrites(const struct option *opt,\nb9b760ed1c 4951) int *break_opt = opt->value;\nb9b760ed1c 4954) BUG_ON_OPT_NEG(unset);\nb9b760ed1c 4955) if (!arg)\nb9b760ed1c 4956) arg = \"\";\nb9b760ed1c 4957) opt1 = parse_rename_score(&arg);\nb9b760ed1c 4958) switch (*arg) {\nb9b760ed1c 4960) opt2 = 0;\nb9b760ed1c 4961) break;\nb9b760ed1c 4963) arg++;\nb9b760ed1c 4964) opt2 = parse_rename_score(&arg);\nb9b760ed1c 4965) break;\nb9b760ed1c 4967) if (*arg != 0)\nb9b760ed1c 4968) return error(_(\"%s expects <n>/<m> form\"), opt->long_name);\nb9b760ed1c 4969) *break_opt = opt1 | (opt2 << 16);\nb9b760ed1c 4970) return 0;\n3d810d1860 4973) static int diff_opt_char(const struct option *opt,\n3d810d1860 4976) char *value = opt->value;\n3d810d1860 4978) BUG_ON_OPT_NEG(unset);\n3d810d1860 4979) if (arg[1])\n3d810d1860 4980) return error(_(\"%s expects a character, got '%s'\"),\n3d810d1860 4982) *value = arg[0];\n3d810d1860 4983) return 0;\n221d676696 4986) static int diff_opt_color_moved(const struct option *opt,\n221d676696 4989) struct diff_options *options = opt->value;\n221d676696 4991) if (unset) {\n221d676696 4992) options->color_moved = COLOR_MOVED_NO;\n221d676696 4993) } else if (!arg) {\n221d676696 5004) return 0;\n7c33a67a2e 5007) static int diff_opt_color_moved_ws(const struct option *opt,\n7c33a67a2e 5010) struct diff_options *options = opt->value;\nda9db54b3e 5013) if (unset) {\nda9db54b3e 5015) return 0;\n7c33a67a2e 5018) cm = parse_color_moved_ws(arg);\n7c33a67a2e 5019) if (cm & COLOR_MOVED_WS_ERROR)\n7c33a67a2e 5020) return error(_(\"invalid mode '%s' in --color-moved-ws\"), arg);\n7c33a67a2e 5021) options->color_moved_ws_handling = cm;\n7c33a67a2e 5022) return 0;\nf3b49b7f9e 5025) static int diff_opt_color_words(const struct option *opt,\nf3b49b7f9e 5028) struct diff_options *options = opt->value;\nf3b49b7f9e 5030) BUG_ON_OPT_NEG(unset);\nf3b49b7f9e 5031) options->use_color = 1;\nf3b49b7f9e 5032) options->word_diff = DIFF_WORDS_COLOR;\nf3b49b7f9e 5033) options->word_regex = arg;\nf3b49b7f9e 5034) return 0;\n58c7ef398e 5037) static int diff_opt_compact_summary(const struct option *opt,\n58c7ef398e 5040) struct diff_options *options = opt->value;\n58c7ef398e 5042) BUG_ON_OPT_ARG(arg);\n58c7ef398e 5043) if (unset) {\n58c7ef398e 5044) options->flags.stat_with_summary = 0;\n58c7ef398e 5046) options->flags.stat_with_summary = 1;\n58c7ef398e 5047) options->output_format |= DIFF_FORMAT_DIFFSTAT;\n58c7ef398e 5049) return 0;\n1efc2689d6 5052) static int diff_opt_diff_algorithm(const struct option *opt,\n1efc2689d6 5055) struct diff_options *options = opt->value;\n1efc2689d6 5056) long value = parse_algorithm_value(arg);\n1efc2689d6 5058) BUG_ON_OPT_NEG(unset);\n1efc2689d6 5059) if (value < 0)\n1efc2689d6 5060) return error(_(\"option diff-algorithm accepts \\\"myers\\\", \"\n1efc2689d6 5064) DIFF_XDL_CLR(options, NEED_MINIMAL);\n1efc2689d6 5065) options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;\n1efc2689d6 5066) options->xdl_opts |= value;\n1efc2689d6 5067) return 0;\nf8d10810d3 5070) static int diff_opt_dirstat(const struct option *opt,\nf8d10810d3 5073) struct diff_options *options = opt->value;\nf8d10810d3 5075) BUG_ON_OPT_NEG(unset);\nf8d10810d3 5076) if (!strcmp(opt->long_name, \"cumulative\")) {\nf8d10810d3 5077) if (arg)\nf8d10810d3 5079) arg = \"cumulative\";\nf8d10810d3 5080) } else if (!strcmp(opt->long_name, \"dirstat-by-file\"))\nf8d10810d3 5081) parse_dirstat_opt(options, \"files\");\nf8d10810d3 5082) parse_dirstat_opt(options, arg ? arg : \"\");\nf8d10810d3 5083) return 0;\n97e53999cd 5086) static int diff_opt_find_copies(const struct option *opt,\n97e53999cd 5089) struct diff_options *options = opt->value;\n97e53999cd 5091) BUG_ON_OPT_NEG(unset);\n97e53999cd 5092) if (!arg)\n97e53999cd 5093) arg = \"\";\n97e53999cd 5094) options->rename_score = parse_rename_score(&arg);\n97e53999cd 5095) if (*arg != 0)\n97e53999cd 5096) return error(_(\"invalid argument to %s\"), opt->long_name);\n97e53999cd 5098) if (options->detect_rename == DIFF_DETECT_COPY)\n97e53999cd 5099) options->flags.find_copies_harder = 1;\n97e53999cd 5101) options->detect_rename = DIFF_DETECT_COPY;\n97e53999cd 5103) return 0;\n10e07ecc0c 5116) return error(_(\"invalid argument to %s\"), opt->long_name);\nc2dcec4fd2 5122) static int diff_opt_follow(const struct option *opt,\nc2dcec4fd2 5125) struct diff_options *options = opt->value;\nc2dcec4fd2 5127) BUG_ON_OPT_ARG(arg);\nc2dcec4fd2 5128) if (unset) {\nc2dcec4fd2 5129) options->flags.follow_renames = 0;\nc2dcec4fd2 5130) options->flags.default_follow_renames = 0;\nc2dcec4fd2 5132) options->flags.follow_renames = 1;\nc2dcec4fd2 5134) return 0;\n6c0ec4f728 5150) static int diff_opt_line_prefix(const struct option *opt,\n6c0ec4f728 5153) struct diff_options *options = opt->value;\n6c0ec4f728 5155) BUG_ON_OPT_NEG(unset);\n6c0ec4f728 5156) options->line_prefix = optarg;\n6c0ec4f728 5157) options->line_prefix_length = strlen(options->line_prefix);\n6c0ec4f728 5158) graph_setup_line_prefix(options);\n6c0ec4f728 5159) return 0;\n059343267e 5162) static int diff_opt_no_prefix(const struct option *opt,\n059343267e 5165) struct diff_options *options = opt->value;\n059343267e 5167) BUG_ON_OPT_NEG(unset);\n059343267e 5168) BUG_ON_OPT_ARG(optarg);\n059343267e 5169) options->a_prefix = \"\";\n059343267e 5170) options->b_prefix = \"\";\n059343267e 5171) return 0;\n3d810d1860 5174) static enum parse_opt_result diff_opt_output(struct parse_opt_ctx_t *ctx,\n3d810d1860 5178) struct diff_options *options = opt->value;\n3d810d1860 5181) BUG_ON_OPT_NEG(unset);\n3d810d1860 5182) path = prefix_filename(ctx->prefix, arg);\n3d810d1860 5183) options->file = xfopen(path, \"w\");\n3d810d1860 5184) options->close_file = 1;\n3d810d1860 5185) if (options->use_color != GIT_COLOR_ALWAYS)\n3d810d1860 5186) options->use_color = GIT_COLOR_NEVER;\n3d810d1860 5187) free(path);\n3d810d1860 5188) return 0;\n2156b1fd0c 5191) static int diff_opt_patience(const struct option *opt,\n2156b1fd0c 5194) struct diff_options *options = opt->value;\n2156b1fd0c 5197) BUG_ON_OPT_NEG(unset);\n2156b1fd0c 5198) BUG_ON_OPT_ARG(arg);\n2156b1fd0c 5199) options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);\n2156b1fd0c 5205) for (i = 0; i < options->anchors_nr; i++)\n2156b1fd0c 5206) free(options->anchors[i]);\n2156b1fd0c 5207) options->anchors_nr = 0;\n2156b1fd0c 5208) return 0;\nd071ebcc8a 5211) static int diff_opt_pickaxe_regex(const struct option *opt,\nd071ebcc8a 5214) struct diff_options *options = opt->value;\nd071ebcc8a 5216) BUG_ON_OPT_NEG(unset);\nd071ebcc8a 5217) options->pickaxe = arg;\nd071ebcc8a 5218) options->pickaxe_opts |= DIFF_PICKAXE_KIND_G;\nd071ebcc8a 5219) return 0;\nd071ebcc8a 5222) static int diff_opt_pickaxe_string(const struct option *opt,\nd071ebcc8a 5225) struct diff_options *options = opt->value;\nd071ebcc8a 5227) BUG_ON_OPT_NEG(unset);\nd071ebcc8a 5228) options->pickaxe = arg;\nd071ebcc8a 5229) options->pickaxe_opts |= DIFF_PICKAXE_KIND_S;\nd071ebcc8a 5230) return 0;\n350a71f2fc 5233) static int diff_opt_relative(const struct option *opt,\n350a71f2fc 5236) struct diff_options *options = opt->value;\n350a71f2fc 5238) BUG_ON_OPT_NEG(unset);\n350a71f2fc 5239) options->flags.relative_name = 1;\n350a71f2fc 5240) if (arg)\n350a71f2fc 5241) options->prefix = arg;\n350a71f2fc 5242) return 0;\n1d2890f4f5 5245) static int diff_opt_submodule(const struct option *opt,\n1d2890f4f5 5248) struct diff_options *options = opt->value;\n1d2890f4f5 5250) BUG_ON_OPT_NEG(unset);\n1d2890f4f5 5251) if (!arg)\n1d2890f4f5 5252) arg = \"log\";\n1d2890f4f5 5253) if (parse_submodule_params(options, arg))\n1d2890f4f5 5254) return error(_(\"failed to parse --submodule option parameter: '%s'\"),\n1d2890f4f5 5256) return 0;\n1d85988346 5259) static int diff_opt_textconv(const struct option *opt,\n1d85988346 5262) struct diff_options *options = opt->value;\n1d85988346 5264) BUG_ON_OPT_ARG(arg);\n1d85988346 5265) if (unset) {\n1d85988346 5266) options->flags.allow_textconv = 0;\n1d85988346 5268) options->flags.allow_textconv = 1;\n1d85988346 5269) options->flags.textconv_set_via_cmdline = 1;\n1d85988346 5271) return 0;\n6643eb7bbf 5284) return error(_(\"%s expects a numerical value\"), \"--unified\");\n08d080bf7f 5290) static int diff_opt_word_diff(const struct option *opt,\n08d080bf7f 5293) struct diff_options *options = opt->value;\n08d080bf7f 5295) BUG_ON_OPT_NEG(unset);\n08d080bf7f 5296) if (arg) {\n08d080bf7f 5308) return error(_(\"bad --word-diff argument: %s\"), arg);\n08d080bf7f 5313) return 0;\nafe77a4dd9 5316) static int diff_opt_word_diff_regex(const struct option *opt,\nafe77a4dd9 5319) struct diff_options *options = opt->value;\nafe77a4dd9 5321) BUG_ON_OPT_NEG(unset);\nafe77a4dd9 5322) if (options->word_diff == DIFF_WORDS_NONE)\nafe77a4dd9 5323) options->word_diff = DIFF_WORDS_PLAIN;\nafe77a4dd9 5324) options->word_regex = arg;\nafe77a4dd9 5325) return 0;\n\nfsck.c\nef644c4150  252) oidset_parse_file(&options->skiplist, buf + equal + 1);\n\nident.c\n97f56073ce 568) static void set_env_if(const char *key, const char *value, int *given, int bit)\n97f56073ce 570) if ((*given & bit) || getenv(key))\n97f56073ce 571) return; /* nothing to do */\n97f56073ce 572) setenv(key, value, 0);\n97f56073ce 573) *given |= bit;\n97f56073ce 576) void prepare_fallback_ident(const char *name, const char *email)\n97f56073ce 578) set_env_if(\"GIT_AUTHOR_NAME\", name,\n97f56073ce 580) set_env_if(\"GIT_AUTHOR_EMAIL\", email,\n97f56073ce 582) set_env_if(\"GIT_COMMITTER_NAME\", name,\n97f56073ce 584) set_env_if(\"GIT_COMMITTER_EMAIL\", email,\n97f56073ce 586) }\n\nlist-objects-filter-options.c\n3a7a698e93  74) if (!get_oid_with_context(the_repository, v0, GET_OID_BLOB,\n\nlist-objects.c\n4f6d26b167 229) static void add_edge_parents(struct commit *commit,\n4f6d26b167 236) for (parents = commit->parents; parents; parents = parents->next) {\n4f6d26b167 237) struct commit *parent = parents->item;\n4f6d26b167 238) struct tree *tree = get_commit_tree(parent);\n4f6d26b167 240) if (!tree)\n4f6d26b167 241) continue;\n4f6d26b167 243) oidset_insert(set, &tree->object.oid);\n4f6d26b167 245) if (!(parent->object.flags & UNINTERESTING))\n4f6d26b167 246) continue;\n4f6d26b167 247) tree->object.flags |= UNINTERESTING;\n4f6d26b167 249) if (revs->edge_hint && !(parent->object.flags & SHOWN)) {\n4f6d26b167 250) parent->object.flags |= SHOWN;\n4f6d26b167 251) show_edge(parent);\n4f6d26b167 254) }\n4f6d26b167 265) oidset_init(&set, 16);\n4f6d26b167 267) for (list = revs->commits; list; list = list->next) {\n4f6d26b167 268) struct commit *commit = list->item;\n4f6d26b167 269) struct tree *tree = get_commit_tree(commit);\n4f6d26b167 271) if (commit->object.flags & UNINTERESTING)\n4f6d26b167 272) tree->object.flags |= UNINTERESTING;\n4f6d26b167 274) oidset_insert(&set, &tree->object.oid);\n4f6d26b167 275) add_edge_parents(commit, revs, show_edge, &set);\n4f6d26b167 278) mark_trees_uninteresting_sparse(revs->repo, &set);\n4f6d26b167 279) oidset_clear(&set);\n4f6d26b167 287) commit->object.flags |= SHOWN;\n4f6d26b167 288) show_edge(commit);\n\nmerge-recursive.c\nd7cf3a96e9  149) static struct tree *shift_tree_object(struct repository *repo,\nd7cf3a96e9  163) return lookup_tree(repo, &shifted);\n0d6caa2d08  428) struct index_state *istate = o->repo->index;\n0d6caa2d08  430) if (unmerged_index(istate)) {\n0d6caa2d08  433) for (i = 0; i < istate->cache_nr; i++) {\n0d6caa2d08  434) const struct cache_entry *ce = istate->cache[i];\n0d6caa2d08  442) if (!istate->cache_tree)\n0d6caa2d08  443) istate->cache_tree = cache_tree();\n0d6caa2d08  445) if (!cache_tree_fully_valid(istate->cache_tree) &&\n0d6caa2d08  446)     cache_tree_update(istate, 0) < 0) {\nd7cf3a96e9  451) result = lookup_tree(o->repo, &istate->cache_tree->oid);\n0d6caa2d08  733) ce = index_file_exists(o->repo->index, path, strlen(path),\n0d6caa2d08 1116) static int find_first_merges(struct repository *repo,\n0d6caa2d08 1137) repo_init_revisions(repo, &revs, NULL);\nd7cf3a96e9 1215) if (!(commit_base = lookup_commit_reference(o->repo, base)) ||\nd7cf3a96e9 1216)     !(commit_a = lookup_commit_reference(o->repo, a)) ||\nd7cf3a96e9 1217)     !(commit_b = lookup_commit_reference(o->repo, b))) {\n0d6caa2d08 1267) parent_count = find_first_merges(o->repo, &merges, path,\n0d6caa2d08 1416) if (!o->call_depth && would_lose_untracked(o, dest->path)) {\n0d6caa2d08 1455)     (!o->call_depth && would_lose_untracked(o, path))) {\n0d6caa2d08 1465) ret = remove_file_from_index(o->repo->index, path);\n0d6caa2d08 1541) return remove_file_from_index(o->repo->index, dest->path);\n0d6caa2d08 1622)     o->call_depth || would_lose_untracked(o, prev_path1));\n0d6caa2d08 1625)     o->call_depth || would_lose_untracked(o, prev_path2));\n0d6caa2d08 1732) if (dir_in_way(o->repo->index, path, !o->call_depth, 0)) {\n0d6caa2d08 1737) } else if (would_lose_untracked(o, path)) {\n0d6caa2d08 1798) remove_file_from_index(o->repo->index, a->path);\n0d6caa2d08 1805) remove_file_from_index(o->repo->index, b->path);\n0d6caa2d08 3057) if (renormalize_buffer(opt->repo->index, path, o.buf, o.len, &o) |\n0d6caa2d08 3058)     renormalize_buffer(opt->repo->index, path, a.buf, a.len, &a))\n0d6caa2d08 3139) if (dir_in_way(o->repo->index, path, !o->call_depth,\n0d6caa2d08 3173) pos = index_name_pos(o->repo->index, path, strlen(path));\n0d6caa2d08 3174) ce = o->repo->index->cache[pos];\n0d6caa2d08 3193) remove_file_from_index(o->repo->index, path);\n0d6caa2d08 3364) remove_file_from_index(o->repo->index, path);\nd7cf3a96e9 3423) merge = shift_tree_object(o->repo, head, merge, o->subtree_shift);\nd7cf3a96e9 3424) common = shift_tree_object(o->repo, head, common, o->subtree_shift);\nd7cf3a96e9 3560) tree = lookup_tree(o->repo, o->repo->hash_algo->empty_tree);\nd7cf3a96e9 3561) merged_common_ancestors = make_virtual_commit(o->repo, tree, \"ancestor\");\n0d6caa2d08 3575) discard_index(o->repo->index);\nd7cf3a96e9 3605) *result = make_virtual_commit(o->repo, mrtree, \"merged tree\");\n\nmerge.c\ne1ff0a32e4  40) if (repo_read_index(r) < 0)\n\nnotes-merge.c\n1d18d7581c 652) create_notes_commit(o->repo, local_tree, parents, o->commit_msg.buf,\n1d18d7581c 727) create_notes_commit(o->repo, partial_tree, partial_commit->parents, msg,\n\nnotes-utils.c\n1d18d7581c   8) void create_notes_commit(struct repository *r,\n1d18d7581c  25) struct commit *parent = lookup_commit(r, &parent_oid);\n1d18d7581c  38) void commit_notes(struct repository *r, struct notes_tree *t, const char *msg)\n1d18d7581c  54) create_notes_commit(r, t, NULL, buf.buf, buf.len, &commit_oid);\n1d18d7581c 175) void finish_copy_notes_for_rewrite(struct repository *r,\n1d18d7581c 181) commit_notes(r, c->trees[i], msg);\n\noidset.c\nef644c4150 39) void oidset_parse_file(struct oidset *set, const char *path)\nef644c4150 42) struct strbuf sb = STRBUF_INIT;\nef644c4150 45) fp = fopen(path, \"r\");\nef644c4150 46) if (!fp)\nef644c4150 47) die(\"Could not open skip list: %s\", path);\nef644c4150 48) while (!strbuf_getline(&sb, fp)) {\nef644c4150 57) hash = strchr(sb.buf, '#');\nef644c4150 58) if (hash)\nef644c4150 59) strbuf_setlen(&sb, hash - sb.buf);\nef644c4150 60) strbuf_trim(&sb);\nef644c4150 61) if (!sb.len)\nef644c4150 62) continue;\nef644c4150 64) if (parse_oid_hex(sb.buf, &oid, &p) || *p != '\\0')\nef644c4150 65) die(\"Invalid SHA-1: %s\", sb.buf);\nef644c4150 66) oidset_insert(set, &oid);\nef644c4150 68) if (ferror(fp))\nef644c4150 69) die_errno(\"Could not read '%s'\", path);\nef644c4150 70) fclose(fp);\nef644c4150 71) strbuf_release(&sb);\nef644c4150 72) }\n\nparse-options-cb.c\n8fc6b47cd5  26) v = the_hash_algo->hexsz;\n08339886b9 173) enum parse_opt_result parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx,\n9b4ae5190a 177) BUG_ON_OPT_ARG(arg);\n08339886b9 178) return PARSE_OPT_UNKNOWN;\n\nparse-options.c\n08339886b9  48) static enum parse_opt_result opt_command_mode_error(\n08339886b9  74) return PARSE_OPT_ERROR;\n9b4ae5190a 183) return (*opt->ll_callback)(p, opt, p_arg, p_unset);\n9b4ae5190a 255) rc = (*numopt->ll_callback)(p, numopt, arg, 0);\n\npretty.c\n4681fe38e1 1060) static int match_placeholder_arg_value(const char *to_parse, const char *candidate,\n4681fe38e1 1067) if (valuestart) {\n4681fe38e1 1068) if (*p != '=')\n4681fe38e1 1069) return 0;\n4681fe38e1 1070) *valuestart = p + 1;\n4681fe38e1 1071) *valuelen = strcspn(*valuestart, \",)\");\n4681fe38e1 1072) p = *valuestart + *valuelen;\n4681fe38e1 1085) static int match_placeholder_arg(const char *to_parse, const char *candidate,\n4681fe38e1 1088) return match_placeholder_arg_value(to_parse, candidate, end, NULL, NULL);\nb755bf6f83 1091) static int match_placeholder_bool_arg(const char *to_parse, const char *candidate,\nb755bf6f83 1095) if (!skip_prefix(to_parse, candidate, &p))\nb755bf6f83 1096) return 0;\nb755bf6f83 1098) if (match_placeholder_arg(p, \"=no\", end) ||\nb755bf6f83 1099)     match_placeholder_arg(p, \"=off\", end) ||\nb755bf6f83 1100)     match_placeholder_arg(p, \"=false\", end)) {\nb755bf6f83 1101) *val = 0;\nb755bf6f83 1102) return 1;\nb755bf6f83 1105) if (match_placeholder_arg(p, \"\", end) ||\nb755bf6f83 1106)     match_placeholder_arg(p, \"=yes\", end) ||\nb755bf6f83 1107)     match_placeholder_arg(p, \"=on\", end) ||\nb755bf6f83 1108)     match_placeholder_arg(p, \"=true\", end)) {\nb755bf6f83 1109) *val = 1;\nb755bf6f83 1110) return 1;\n4681fe38e1 1112) return 0;\n4681fe38e1 1115) static int format_trailer_match_cb(const struct strbuf *key, void *ud)\n4681fe38e1 1117) const struct string_list *list = ud;\n4681fe38e1 1120) for_each_string_list_item (item, list) {\n4681fe38e1 1121) if (key->len == (uintptr_t)item->util &&\n4681fe38e1 1122)     !strncasecmp (item->string, key->buf, key->len))\n4681fe38e1 1123) return 1;\nb755bf6f83 1125) return 0;\n18f8e81091 1143) return res;\n4681fe38e1 1369) struct string_list filter_list = STRING_LIST_INIT_NODUP;\nced45aab72 1370) struct strbuf sepbuf = STRBUF_INIT;\nffd7cae405 1371) size_t ret = 0;\n4681fe38e1 1381) if (match_placeholder_arg_value(arg, \"key\", &arg, &argval, &arglen)) {\n4681fe38e1 1382) uintptr_t len = arglen;\n4681fe38e1 1383) if (len && argval[len - 1] == ':')\n4681fe38e1 1384) len--;\n4681fe38e1 1385) string_list_append(&filter_list, argval)->util = (char *)len;\n4681fe38e1 1387) opts.filter = format_trailer_match_cb;\n4681fe38e1 1388) opts.filter_data = &filter_list;\nced45aab72 1390) } else if (match_placeholder_arg_value(arg, \"separator\", &arg, &argval, &arglen)) {\nced45aab72 1393) strbuf_reset(&sepbuf);\nced45aab72 1394) fmt = xstrndup(argval, arglen);\nced45aab72 1395) strbuf_expand(&sepbuf, fmt, strbuf_expand_literal_cb, NULL);\nced45aab72 1396) free(fmt);\nced45aab72 1397) opts.separator = &sepbuf;\n4681fe38e1 1398) } else if (!match_placeholder_bool_arg(arg, \"only\", &arg, &opts.only_trailers) &&\ne9da5de761 1399)    !match_placeholder_bool_arg(arg, \"unfold\", &arg, &opts.unfold) &&\ne9da5de761 1400)    !match_placeholder_bool_arg(arg, \"valueonly\", &arg, &opts.value_only))\nffd7cae405 1406) ret = arg - placeholder + 1;\n4681fe38e1 1408) string_list_clear (&filter_list, 0);\nced45aab72 1409) strbuf_release(&sepbuf);\nffd7cae405 1410) return ret;\n\nprotocol.c\n6da1f1a920  31) return protocol_v0_string;\n6da1f1a920  33) return protocol_v1_string;\n6da1f1a920  37) die(_(\"Unrecognized protocol version\"));\n6da1f1a920  39) die(_(\"Unrecognized protocol_version\"));\n6da1f1a920  76) return;\n6da1f1a920 112) ALLOC_ARRAY(tmp_allowed_versions, tmp_nr);\n6da1f1a920 113) copy_array(tmp_allowed_versions, allowed_versions, tmp_nr,\n6da1f1a920 122) for (i = 1; i < nr_allowed_versions; i++)\n6da1f1a920 123) if (tmp_allowed_versions[i] == config_version) {\n6da1f1a920 124) SWAP(tmp_allowed_versions[0],\n6da1f1a920 131) strbuf_addf(advert, \":version=%s\",\n6da1f1a920 132)     format_protocol_version(tmp_allowed_versions[i]));\n\nrebase-interactive.c\nc27b32f0ec  15) static enum missing_commit_check_level get_missing_commit_check_level(void)\nc27b32f0ec  19) if (git_config_get_value(\"rebase.missingcommitscheck\", &value) ||\nc27b32f0ec  20) !strcasecmp(\"ignore\", value))\nc27b32f0ec  21) return MISSING_COMMIT_CHECK_IGNORE;\nc27b32f0ec  22) if (!strcasecmp(\"warn\", value))\nc27b32f0ec  23) return MISSING_COMMIT_CHECK_WARN;\nc27b32f0ec  24) if (!strcasecmp(\"error\", value))\nc27b32f0ec  25) return MISSING_COMMIT_CHECK_ERROR;\nc27b32f0ec  26) warning(_(\"unrecognized setting %s for option \"\nc27b32f0ec  28) return MISSING_COMMIT_CHECK_IGNORE;\n2dd989a694  31) void append_todo_help(unsigned keep_empty, int command_count,\n2dd989a694  52) unsigned edit_todo = !(shortrevisions && shortonto);\n2dd989a694  54) if (!edit_todo) {\n2dd989a694  55) strbuf_addch(buf, '\\n');\n2dd989a694  56) strbuf_commented_addf(buf, Q_(\"Rebase %s onto %s (%d command)\",\ne5b1c9d929  90) int edit_todo_list(struct repository *r, struct todo_list *todo_list,\ne5b1c9d929  95) unsigned initial = shortrevisions && shortonto;\ne5b1c9d929  97) if (initial) {\ne5b1c9d929  98) todo_list_write_to_file(r, todo_list, todo_file, shortrevisions, shortonto,\ne5b1c9d929 101) if (copy_file(rebase_path_todo_backup(), todo_file, 0666))\ne5b1c9d929 102) return error(_(\"could not copy '%s' to '%s'.\"), todo_file,\ne5b1c9d929 105) todo_list_parse_insn_buffer(r, todo_list->buf.buf, todo_list);\ne5b1c9d929 106) todo_list_write_to_file(r, todo_list, todo_file, NULL, NULL, -1,\ne5b1c9d929 110) if (launch_sequence_editor(todo_file, &new_todo->buf, NULL))\ne5b1c9d929 111) return -2;\ne5b1c9d929 113) strbuf_stripspace(&new_todo->buf, 1);\ne5b1c9d929 114) if (initial && new_todo->buf.len == 0)\ne5b1c9d929 115) return -3;\ne5b1c9d929 117) if (!initial)\ne5b1c9d929 118) todo_list_parse_insn_buffer(r, new_todo->buf.buf, new_todo);\ne5b1c9d929 120) return 0;\nc27b32f0ec 123) define_commit_slab(commit_seen, unsigned char);\nc27b32f0ec 130) int todo_list_check(struct todo_list *old_todo, struct todo_list *new_todo)\nc27b32f0ec 132) enum missing_commit_check_level check_level = get_missing_commit_check_level();\nc27b32f0ec 133) struct strbuf missing = STRBUF_INIT;\nc27b32f0ec 134) int res = 0, i;\nc27b32f0ec 137) init_commit_seen(&commit_seen);\nc27b32f0ec 139) if (check_level == MISSING_COMMIT_CHECK_IGNORE)\nc27b32f0ec 140) goto leave_check;\nc27b32f0ec 143) for (i = 0; i < new_todo->nr; i++) {\nc27b32f0ec 144) struct commit *commit = new_todo->items[i].commit;\nc27b32f0ec 145) if (commit)\nc27b32f0ec 146) *commit_seen_at(&commit_seen, commit) = 1;\nc27b32f0ec 150) for (i = old_todo->nr - 1; i >= 0; i--) {\nc27b32f0ec 151) struct todo_item *item = old_todo->items + i;\nc27b32f0ec 152) struct commit *commit = item->commit;\nc27b32f0ec 153) if (commit && !*commit_seen_at(&commit_seen, commit)) {\nc27b32f0ec 154) strbuf_addf(&missing, \" - %s %.*s\\n\",\nc27b32f0ec 155)     find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV),\nc27b32f0ec 157)     old_todo->buf.buf + item->arg_offset);\nc27b32f0ec 158) *commit_seen_at(&commit_seen, commit) = 1;\nc27b32f0ec 163) if (!missing.len)\nc27b32f0ec 164) goto leave_check;\nc27b32f0ec 166) if (check_level == MISSING_COMMIT_CHECK_ERROR)\nc27b32f0ec 167) res = 1;\nc27b32f0ec 169) fprintf(stderr,\nc27b32f0ec 174) fputs(missing.buf, stderr);\nc27b32f0ec 175) strbuf_release(&missing);\nc27b32f0ec 177) fprintf(stderr, _(\"To avoid this message, use \\\"drop\\\" to \"\nc27b32f0ec 184) clear_commit_seen(&commit_seen);\nc27b32f0ec 185) return res;\n\nremote-curl.c\n6da1f1a920  344) return 0;\n34a9469d6a  363) return;\n34a9469d6a  373) die(\"invalid server response; expected service, got flush packet\");\n240fb9b7a0  392) } else if (!strcmp(line, \"version 2\")) {\n34a9469d6a  397) d->proto_git = 1;\ne586e7df7c  399) } else if (skip_prefix(line, \"ERR \", &p)) {\ne586e7df7c  400) die(_(\"remote error: %s\"), p);\n\nrepository.c\nrerere.c\ne1ff0a32e4  598) if (repo_read_index(r) < 0)\n3a95f31d1c  708) repo_hold_locked_index(r, &index_lock, LOCK_DIE_ON_ERROR);\ne1ff0a32e4 1110) if (repo_read_index(r) < 0)\n\nrevision.c\nd5d2e93577  109) static int path_and_oids_cmp(const void *hashmap_cmp_fn_data,\nd5d2e93577  114) return strcmp(e1->path, e2->path);\nd5d2e93577  117) static void paths_and_oids_init(struct hashmap *map)\nd5d2e93577  119) hashmap_init(map, (hashmap_cmp_fn) path_and_oids_cmp, NULL, 0);\nd5d2e93577  120) }\nd5d2e93577  122) static void paths_and_oids_clear(struct hashmap *map)\nd5d2e93577  126) hashmap_iter_init(map, &iter);\nd5d2e93577  128) while ((entry = (struct path_and_oids_entry *)hashmap_iter_next(&iter))) {\nd5d2e93577  129) oidset_clear(&entry->trees);\nd5d2e93577  130) free(entry->path);\nd5d2e93577  133) hashmap_free(map, 1);\nd5d2e93577  134) }\nd5d2e93577  136) static void paths_and_oids_insert(struct hashmap *map,\nd5d2e93577  140) int hash = strhash(path);\nd5d2e93577  144) hashmap_entry_init(&key, hash);\nd5d2e93577  147) key.path = (char *)path;\nd5d2e93577  148) oidset_init(&key.trees, 0);\nd5d2e93577  150) if (!(entry = (struct path_and_oids_entry *)hashmap_get(map, &key, NULL))) {\nd5d2e93577  151) entry = xcalloc(1, sizeof(struct path_and_oids_entry));\nd5d2e93577  152) hashmap_entry_init(entry, hash);\nd5d2e93577  153) entry->path = xstrdup(key.path);\nd5d2e93577  154) oidset_init(&entry->trees, 16);\nd5d2e93577  155) hashmap_put(map, entry);\nd5d2e93577  158) oidset_insert(&entry->trees, oid);\nd5d2e93577  159) }\nd5d2e93577  161) static void add_children_by_path(struct repository *r,\nd5d2e93577  168) if (!tree)\nd5d2e93577  169) return;\nd5d2e93577  171) if (parse_tree_gently(tree, 1) < 0)\nd5d2e93577  172) return;\nd5d2e93577  174) init_tree_desc(&desc, tree->buffer, tree->size);\nd5d2e93577  175) while (tree_entry(&desc, &entry)) {\nd5d2e93577  176) switch (object_type(entry.mode)) {\n5dde8fc6df  178) paths_and_oids_insert(map, entry.path, &entry.oid);\nd5d2e93577  180) if (tree->object.flags & UNINTERESTING) {\n5dde8fc6df  181) struct tree *child = lookup_tree(r, &entry.oid);\nd5d2e93577  182) if (child)\nd5d2e93577  183) child->object.flags |= UNINTERESTING;\nd5d2e93577  185) break;\nd5d2e93577  187) if (tree->object.flags & UNINTERESTING) {\n5dde8fc6df  188) struct blob *child = lookup_blob(r, &entry.oid);\nd5d2e93577  189) if (child)\nd5d2e93577  190) child->object.flags |= UNINTERESTING;\nd5d2e93577  192) break;\nd5d2e93577  195) break;\nd5d2e93577  199) free_tree_buffer(tree);\nf1f5de442f  202) void mark_trees_uninteresting_sparse(struct repository *r,\nd5d2e93577  205) unsigned has_interesting = 0, has_uninteresting = 0;\nf1f5de442f  212) oidset_iter_init(trees, &iter);\nd5d2e93577  213) while ((!has_interesting || !has_uninteresting) &&\nf1f5de442f  215) struct tree *tree = lookup_tree(r, oid);\nf1f5de442f  217) if (!tree)\nf1f5de442f  218) continue;\nd5d2e93577  220) if (tree->object.flags & UNINTERESTING)\nd5d2e93577  221) has_uninteresting = 1;\nd5d2e93577  223) has_interesting = 1;\nd5d2e93577  227) if (!has_uninteresting || !has_interesting)\nd5d2e93577  228) return;\nd5d2e93577  230) paths_and_oids_init(&map);\nd5d2e93577  232) oidset_iter_init(trees, &iter);\nd5d2e93577  233) while ((oid = oidset_iter_next(&iter))) {\nd5d2e93577  234) struct tree *tree = lookup_tree(r, oid);\nd5d2e93577  235) add_children_by_path(r, tree, &map);\nd5d2e93577  238) hashmap_iter_init(&map, &map_iter);\nd5d2e93577  239) while ((entry = hashmap_iter_next(&map_iter)))\nd5d2e93577  240) mark_trees_uninteresting_sparse(r, &entry->trees);\nd5d2e93577  242) paths_and_oids_clear(&map);\ne1ff0a32e4 1690) repo_read_index(revs->repo);\n3a7a698e93 1749) if (get_oid_with_context(revs->repo, a_name, oc_flags, &a_oid, a_oc) ||\n3a7a698e93 1750)     get_oid_with_context(revs->repo, b_name, oc_flags, &b_oid, b_oc))\n\nsequencer.c\ne5b1c9d929   58) GIT_PATH_FUNC(rebase_path_todo_backup, \"rebase-merge/git-rebase-todo.backup\")\ne1ff0a32e4  449) static int error_dirty_index(struct repository *repo, struct replay_opts *opts)\ne1ff0a32e4  451) if (repo_read_index_unmerged(repo))\ne1ff0a32e4  486) repo_read_index(r);\n1d18d7581c 1118) void commit_post_rewrite(struct repository *r,\n1d18d7581c 1128) finish_copy_notes_for_rewrite(r, cfg, \"Notes added by 'git commit --amend'\");\n1d18d7581c 1409) commit_post_rewrite(r, current_head, oid);\ne1ff0a32e4 1745) return error_dirty_index(r, opts);\n5d94d54564 1996) void todo_list_release(struct todo_list *todo_list)\nd836079ec2 2024) item->arg_offset = bol - buf;\nd836079ec2 2051) item->arg_offset = bol - buf;\nd836079ec2 2063) item->arg_offset = bol - buf;\nd836079ec2 2077) item->arg_offset = bol - buf;\nd836079ec2 2089) bol = end_of_object_name + strspn(end_of_object_name, \" \\t\");\nd836079ec2 2090) item->arg_offset = bol - buf;\nd836079ec2 2091) item->arg_len = (int)(eol - bol);\n5d94d54564 2100) int todo_list_parse_insn_buffer(struct repository *r, char *buf,\n2b71595d47 2107) todo_list->current = todo_list->nr = 0;\nd836079ec2 2119) if (parse_insn_line(r, item, buf, p, eol)) {\n2b71595d47 2122) item->command = TODO_COMMENT + 1;\nd836079ec2 2123) item->arg_offset = p - buf;\n2b71595d47 2124) item->arg_len = (int)(eol - p);\n2b71595d47 2125) item->commit = NULL;\n5d94d54564 2200) res = todo_list_parse_insn_buffer(r, todo_list->buf.buf, todo_list);\n5d94d54564 2231)     !todo_list_parse_insn_buffer(r, done.buf.buf, &done))\nd836079ec2 2468) item->arg_offset = 0;\ne1ff0a32e4 2829) if (discard_index(r->index) < 0 || repo_read_index(r) < 0)\n3a95f31d1c 2953) if (repo_hold_locked_index(r, &lock, LOCK_REPORT_ON_ERROR) < 0)\ne1ff0a32e4 2998) if (repo_read_index_unmerged(r)) {\n3a95f31d1c 3071) if (repo_hold_locked_index(r, &lock, LOCK_REPORT_ON_ERROR) < 0) {\ne1ff0a32e4 3252)      repo_read_index(r) < 0))\ne1ff0a32e4 3274) repo_read_index(r);\n0d6caa2d08 3275) init_merge_options(&o, r);\nd836079ec2 3507) const char *arg = todo_list->buf.buf + item->arg_offset;\nd836079ec2 3595) char *end_of_arg = (char *)(arg + item->arg_len);\nd836079ec2 3600) res = do_exec(r, arg);\nd836079ec2 3618) if ((res = do_label(r, arg, item->arg_len)))\nd836079ec2 3621) if ((res = do_reset(r, arg, item->arg_len, opts)))\ne1ff0a32e4 3950) res = error_dirty_index(r, opts);\n0566a4f68e 4372) strbuf_addf(out, \"%s onto\\n\", cmd_label);\n0566a4f68e 4382) strbuf_addf(out, \"\\n%c Branch %s\\n\", comment_line_char, entry->string);\n0566a4f68e 4384) strbuf_addch(out, '\\n');\n0566a4f68e 4397) strbuf_addf(out, \"%s %s\\n\", cmd_reset,\n0566a4f68e 4411) strbuf_addf(out, \"%s onto\\n\", cmd_reset);\n0566a4f68e 4415) strbuf_addf(out, \"%s %s # %s\\n\",\n0566a4f68e 4425) strbuf_addf(out, \"%s\\n\", entry->string);\n0566a4f68e 4428) strbuf_addf(out, \"%s %s\\n\",\n0566a4f68e 4429)     cmd_label, entry->string);\n0566a4f68e 4451) int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,\n0566a4f68e 4499) strbuf_addf(out, \"%c \", comment_line_char);\n0566a4f68e 4500) strbuf_addf(out, \"%s %s \", insn,\n0566a4f68e 4502) pretty_print_commit(&pp, commit, out);\n0566a4f68e 4503) strbuf_addch(out, '\\n');\n8414c890aa 4508) static void todo_list_add_exec_commands(struct todo_list *todo_list,\n8414c890aa 4511) struct strbuf *buf = &todo_list->buf;\n8414c890aa 4512) size_t base_offset = buf->len;\n8414c890aa 4513) int i, insert, nr = 0, alloc = 0;\n8414c890aa 4514) struct todo_item *items = NULL, *base_items = NULL;\n8414c890aa 4516) base_items = xcalloc(commands->nr, sizeof(struct todo_item));\n8414c890aa 4517) for (i = 0; i < commands->nr; ++i) {\n8414c890aa 4518) size_t command_len = strlen(commands->items[i].string);\n8414c890aa 4520) strbuf_addstr(buf, commands->items[i].string);\n8414c890aa 4521) strbuf_addch(buf, '\\n');\n8414c890aa 4523) base_items[i].command = TODO_EXEC;\n8414c890aa 4524) base_items[i].offset_in_buf = base_offset;\n8414c890aa 4525) base_items[i].arg_offset = base_offset + strlen(\"exec \");\n8414c890aa 4526) base_items[i].arg_len = command_len - strlen(\"exec \");\n8414c890aa 4528) base_offset += command_len + 1;\n8414c890aa 4537) for (i = 0; i < todo_list->nr; i++) {\n8414c890aa 4538) enum todo_command command = todo_list->items[i].command;\n8414c890aa 4539) if (insert >= 0 && command != TODO_COMMENT && !is_fixup(command)) {\n8414c890aa 4540) ALLOC_GROW(items, nr + commands->nr, alloc);\n8414c890aa 4541) COPY_ARRAY(items + nr, base_items, commands->nr);\n8414c890aa 4542) nr += commands->nr;\n8414c890aa 4546) ALLOC_GROW(items, nr + 1, alloc);\n8414c890aa 4547) items[nr++] = todo_list->items[i];\n8414c890aa 4549) if (command == TODO_PICK || command == TODO_MERGE || is_fixup(command))\n8414c890aa 4554) if (insert >= 0 || nr == todo_list->nr) {\n8414c890aa 4555) ALLOC_GROW(items, nr + commands->nr, alloc);\n8414c890aa 4556) COPY_ARRAY(items + nr, base_items, commands->nr);\n8414c890aa 4557) nr += commands->nr;\n8414c890aa 4560) free(base_items);\n8414c890aa 4561) FREE_AND_NULL(todo_list->items);\n8414c890aa 4562) todo_list->items = items;\n8414c890aa 4563) todo_list->nr = nr;\n8414c890aa 4564) todo_list->alloc = alloc;\n8414c890aa 4571) int sequencer_add_exec_commands(struct repository *r,\n8414c890aa 4579) return error_errno(_(\"could not read '%s'.\"), todo_file);\n8414c890aa 4581) if (todo_list_parse_insn_buffer(r, todo_list.buf.buf, &todo_list)) {\n8414c890aa 4586) todo_list_add_exec_commands(&todo_list, commands);\n8414c890aa 4587) res = todo_list_write_to_file(r, &todo_list, todo_file, NULL, NULL, -1, 0);\n0cce4a2756 4588) todo_list_release(&todo_list);\n8414c890aa 4590) if (res)\n8414c890aa 4591) return error_errno(_(\"could not write '%s'.\"), todo_file);\n8414c890aa 4592) return 0;\ncf18b3f6c9 4595) static void todo_list_to_strbuf(struct repository *r, struct todo_list *todo_list,\ncf18b3f6c9 4599) int i, max = todo_list->nr;\ncf18b3f6c9 4601) if (num > 0 && num < max)\ncf18b3f6c9 4602) max = num;\ncf18b3f6c9 4604) for (item = todo_list->items, i = 0; i < max; i++, item++) {\ncf18b3f6c9 4607) strbuf_addf(buf, \"%.*s\\n\", item->arg_len,\n3ebafef416 4608)     todo_list->buf.buf + item->arg_offset);\ncf18b3f6c9 4614) strbuf_addch(buf, command_to_char(item->command));\ncf18b3f6c9 4616) strbuf_addstr(buf, command_to_string(item->command));\ncf18b3f6c9 4626) strbuf_addstr(buf, \" -c\");\ncf18b3f6c9 4628) strbuf_addstr(buf, \" -C\");\ncf18b3f6c9 4631) strbuf_addf(buf, \" %s\", oid);\ncf18b3f6c9 4636) strbuf_addch(buf, '\\n');\ncf18b3f6c9 4638) strbuf_addf(buf, \" %.*s\\n\", item->arg_len,\n3ebafef416 4639)     todo_list->buf.buf + item->arg_offset);\ncf18b3f6c9 4643) int todo_list_write_to_file(struct repository *r, struct todo_list *todo_list,\ncf18b3f6c9 4648) struct strbuf buf = STRBUF_INIT;\ncf18b3f6c9 4650) todo_list_to_strbuf(r, todo_list, &buf, num, flags);\n2dd989a694 4651) if (flags & TODO_LIST_APPEND_TODO_HELP)\n2dd989a694 4652) append_todo_help(flags & TODO_LIST_KEEP_EMPTY, count_commands(todo_list),\ncf18b3f6c9 4655) res = write_message(buf.buf, buf.len, file, 0);\n3ebafef416 4656) strbuf_release(&buf);\ncf18b3f6c9 4658) return res;\nc27b32f0ec 4667) int check_todo_list_from_file(struct repository *r)\nc27b32f0ec 4669) struct todo_list old_todo = TODO_LIST_INIT, new_todo = TODO_LIST_INIT;\nc27b32f0ec 4670) int res = 0;\nc27b32f0ec 4672) if (strbuf_read_file_or_whine(&new_todo.buf, rebase_path_todo()) < 0) {\n878056005e 4673) res = -1;\nc27b32f0ec 4674) goto out;\nc27b32f0ec 4677) if (strbuf_read_file_or_whine(&old_todo.buf, rebase_path_todo_backup()) < 0) {\nc27b32f0ec 4679) goto out;\nc27b32f0ec 4682) res = todo_list_parse_insn_buffer(r, old_todo.buf.buf, &old_todo);\nc27b32f0ec 4683) if (!res)\nc27b32f0ec 4684) res = todo_list_parse_insn_buffer(r, new_todo.buf.buf, &new_todo);\nc27b32f0ec 4685) if (!res)\nc27b32f0ec 4686) res = todo_list_check(&old_todo, &new_todo);\nc27b32f0ec 4687) if (res)\nc27b32f0ec 4688) fprintf(stderr, _(edit_todo_list_advice));\nc27b32f0ec 4690) todo_list_release(&old_todo);\nc27b32f0ec 4691) todo_list_release(&new_todo);\n98b29e0607 4697) static int skip_unnecessary_picks(struct repository *r,\n98b29e0607 4704) for (i = 0; i < todo_list->nr; i++) {\n98b29e0607 4705) struct todo_item *item = todo_list->items + i;\n98b29e0607 4727) if (todo_list_write_to_file(r, todo_list, done_path, NULL, NULL, i, 0)) {\n98b29e0607 4732) MOVE_ARRAY(todo_list->items, todo_list->items + i, todo_list->nr - i);\n98b29e0607 4733) todo_list->nr -= i;\n98b29e0607 4734) todo_list->current = 0;\n98b29e0607 4736) if (is_fixup(peek_command(todo_list, 0)))\n98b29e0607 4737) record_in_rewritten(output_oid, peek_command(todo_list, 0));\nc1c074e0cc 4751) struct todo_list new_todo = TODO_LIST_INIT;\nc1c074e0cc 4752) struct strbuf *buf = &todo_list->buf;\nc1c074e0cc 4759) if (buf->len == 0) {\nc1c074e0cc 4760) struct todo_item *item = append_new_todo(todo_list);\nc1c074e0cc 4761) item->command = TODO_NOOP;\nc1c074e0cc 4762) item->commit = NULL;\nc1c074e0cc 4763) item->arg_len = item->arg_offset = item->flags = item->offset_in_buf = 0;\nc1c074e0cc 4766) if (autosquash && todo_list_rearrange_squash(todo_list))\n8414c890aa 4769) if (commands->nr)\nc1c074e0cc 4770) todo_list_add_exec_commands(todo_list, commands);\nc1c074e0cc 4772) if (count_commands(todo_list) == 0) {\n33bc1844f7 4779) res = edit_todo_list(r, todo_list, &new_todo, shortrevisions,\n33bc1844f7 4781) if (res == -1)\n33bc1844f7 4783) else if (res == -2) {\n33bc1844f7 4788) } else if (res == -3) {\nc1c074e0cc 4791) todo_list_release(&new_todo);\nc1c074e0cc 4796) if (todo_list_parse_insn_buffer(r, new_todo.buf.buf, &new_todo) ||\nc1c074e0cc 4797)     todo_list_check(todo_list, &new_todo)) {\nc1c074e0cc 4798) fprintf(stderr, _(edit_todo_list_advice));\nc1c074e0cc 4800) todo_list_release(&new_todo);\n98b29e0607 4805) if (opts->allow_ff && skip_unnecessary_picks(r, &new_todo, &oid)) {\n98b29e0607 4806) todo_list_release(&new_todo);\nc1c074e0cc 4810) if (todo_list_write_to_file(r, &new_todo, todo_file, NULL, NULL, -1,\nc1c074e0cc 4812) todo_list_release(&new_todo);\nc1c074e0cc 4813) return error_errno(_(\"could not write '%s'\"), todo_file);\nc1c074e0cc 4816) todo_list_release(&new_todo);\nfebebd99b6 4851) static int todo_list_rearrange_squash(struct todo_list *todo_list)\nfebebd99b6 4854) int rearranged = 0, *next, *tail, i, nr = 0, alloc = 0;\nfebebd99b6 4857) struct todo_item *items = NULL;\nfebebd99b6 4870)      NULL, todo_list->nr);\nfebebd99b6 4871) ALLOC_ARRAY(next, todo_list->nr);\nfebebd99b6 4872) ALLOC_ARRAY(tail, todo_list->nr);\nfebebd99b6 4873) ALLOC_ARRAY(subjects, todo_list->nr);\nfebebd99b6 4874) for (i = 0; i < todo_list->nr; i++) {\nfebebd99b6 4876) struct todo_item *item = todo_list->items + i;\nfebebd99b6 4923) - todo_list->items;\nfebebd99b6 4936) todo_list->items[i].command =\nfebebd99b6 4954) for (i = 0; i < todo_list->nr; i++) {\nfebebd99b6 4955) enum todo_command command = todo_list->items[i].command;\nfebebd99b6 4966) ALLOC_GROW(items, nr + 1, alloc);\nfebebd99b6 4967) items[nr++] = todo_list->items[cur];\nfebebd99b6 4972) FREE_AND_NULL(todo_list->items);\nfebebd99b6 4973) todo_list->items = items;\nfebebd99b6 4974) todo_list->nr = nr;\nfebebd99b6 4975) todo_list->alloc = alloc;\nfebebd99b6 4980) for (i = 0; i < todo_list->nr; i++)\nfebebd99b6 4987) return 0;\nfebebd99b6 4990) int rearrange_squash_in_todo_file(struct repository *r)\nfebebd99b6 4992) const char *todo_file = rebase_path_todo();\nfebebd99b6 4993) struct todo_list todo_list = TODO_LIST_INIT;\nfebebd99b6 4994) int res = 0;\nfebebd99b6 4996) if (strbuf_read_file_or_whine(&todo_list.buf, todo_file) < 0)\nfebebd99b6 4997) return -1;\nfebebd99b6 4998) if (todo_list_parse_insn_buffer(r, todo_list.buf.buf, &todo_list) < 0) {\nfebebd99b6 4999) todo_list_release(&todo_list);\nfebebd99b6 5000) return -1;\nfebebd99b6 5003) res = todo_list_rearrange_squash(&todo_list);\nfebebd99b6 5004) if (!res)\nfebebd99b6 5005) res = todo_list_write_to_file(r, &todo_list, todo_file, NULL, NULL, -1, 0);\nfebebd99b6 5007) todo_list_release(&todo_list);\nfebebd99b6 5009) if (res)\nfebebd99b6 5010) return error_errno(_(\"could not write '%s'.\"), todo_file);\nfebebd99b6 5011) return 0;\n\nsha1-name.c\n4e763fae87 sha1-name.c 1523) int get_oidf(struct object_id *oid, const char *fmt, ...)\n4e763fae87 sha1-name.c 1527) struct strbuf sb = STRBUF_INIT;\n4e763fae87 sha1-name.c 1529) va_start(ap, fmt);\n4e763fae87 sha1-name.c 1530) strbuf_vaddf(&sb, fmt, ap);\n4e763fae87 sha1-name.c 1531) va_end(ap);\n4e763fae87 sha1-name.c 1533) ret = get_oid(sb.buf, oid);\n4e763fae87 sha1-name.c 1534) strbuf_release(&sb);\n4e763fae87 sha1-name.c 1536) return ret;\n3a7a698e93 sha1-name.c 1624) static void diagnose_invalid_index_path(struct index_state *istate,\n3a7a698e93 sha1-name.c 1638) pos = index_name_pos(istate, filename, namelen);\n3a7a698e93 sha1-name.c 1641) if (pos < istate->cache_nr) {\n3a7a698e93 sha1-name.c 1642) ce = istate->cache[pos];\n3a7a698e93 sha1-name.c 1654) pos = index_name_pos(istate, fullname.buf, fullname.len);\n3a7a698e93 sha1-name.c 1657) if (pos < istate->cache_nr) {\n3a7a698e93 sha1-name.c 1658) ce = istate->cache[pos];\n3a7a698e93 sha1-name.c 1771) diagnose_invalid_index_path(repo->index, stage, prefix, cp);\n\nstrbuf.c\nbfc3fe33f6  252) void strbuf_vinsertf(struct strbuf *sb, size_t pos, const char *fmt, va_list ap)\nbfc3fe33f6  258) if (pos > sb->len)\nbfc3fe33f6  259) die(\"`pos' is too far after the end of the buffer\");\nbfc3fe33f6  260) va_copy(cp, ap);\nbfc3fe33f6  261) len = vsnprintf(sb->buf + sb->len, 0, fmt, cp);\nbfc3fe33f6  262) va_end(cp);\nbfc3fe33f6  263) if (len < 0)\nbfc3fe33f6  265) if (!len)\nbfc3fe33f6  266) return; /* nothing to do */\nbfc3fe33f6  267) if (unsigned_add_overflows(sb->len, len))\nbfc3fe33f6  268) die(\"you want to use way too much memory\");\nbfc3fe33f6  269) strbuf_grow(sb, len);\nbfc3fe33f6  270) memmove(sb->buf + pos + len, sb->buf + pos, sb->len - pos);\nbfc3fe33f6  272) save = sb->buf[pos + len];\nbfc3fe33f6  273) len2 = vsnprintf(sb->buf + pos, sb->alloc - sb->len, fmt, ap);\nbfc3fe33f6  274) sb->buf[pos + len] = save;\nbfc3fe33f6  275) if (len2 != len)\nbfc3fe33f6  277) strbuf_setlen(sb, sb->len + len);\nbfc3fe33f6  280) void strbuf_insertf(struct strbuf *sb, size_t pos, const char *fmt, ...)\nbfc3fe33f6  283) va_start(ap, fmt);\nbfc3fe33f6  284) strbuf_vinsertf(sb, pos, fmt, ap);\nbfc3fe33f6  285) va_end(ap);\nbfc3fe33f6  286) }\n0c1599c33c  307) const char *strbuf_join_argv(struct strbuf *buf,\n0c1599c33c  310) if (!argc)\n0c1599c33c  311) return buf->buf;\n0c1599c33c  313) strbuf_addstr(buf, *argv);\n0c1599c33c  314) while (--argc) {\n0c1599c33c  315) strbuf_addch(buf, delim);\n0c1599c33c  316) strbuf_addstr(buf, *(++argv));\n0c1599c33c  319) return buf->buf;\n18f8e81091  442) strbuf_addch(sb, '\\n');\n18f8e81091  443) return 1;\n18f8e81091  446) ch = hex2chr(placeholder + 1);\n18f8e81091  447) if (ch < 0)\n18f8e81091  448) return 0;\n18f8e81091  449) strbuf_addch(sb, ch);\n18f8e81091  450) return 3;\n\ntrailer.c\nced45aab72 1132) size_t origlen = out->len;\nced45aab72 1136) if (!opts->only_trailers && !opts->unfold && !opts->filter && !opts->separator) {\n4681fe38e1 1151) if (!opts->filter || opts->filter(&tok, opts->filter_data)) {\n4681fe38e1 1152) if (opts->unfold)\n4681fe38e1 1153) unfold_value(&val);\nced45aab72 1155) if (opts->separator && out->len != origlen)\nced45aab72 1156) strbuf_addbuf(out, opts->separator);\ne9da5de761 1157) if (!opts->value_only)\ne9da5de761 1158) strbuf_addf(out, \"%s: \", tok.buf);\ne9da5de761 1159) strbuf_addbuf(out, &val);\nced45aab72 1160) if (!opts->separator)\nced45aab72 1161) strbuf_addch(out, '\\n');\nced45aab72 1167) if (opts->separator && out->len != origlen) {\nced45aab72 1168) strbuf_addbuf(out, opts->separator);\nced45aab72 1171) if (opts->separator) {\nced45aab72 1172) strbuf_rtrim(out);\n\nworktree.c\n2ec5633ff4 587) char *get_worktree_config(struct repository *r)\n2ec5633ff4 589) struct worktree **worktrees = get_worktrees(0);\n2ec5633ff4 592) if (repository_format_worktree_config)\n2ec5633ff4 593) path = repo_git_path(r, \"config.worktree\");\n2ec5633ff4 594) else if (worktrees[0] && worktrees[1])\n2ec5633ff4 595) path = NULL;\n2ec5633ff4 597) path = repo_git_path(r, \"config\");\n2ec5633ff4 599) free_worktrees(worktrees);\n2ec5633ff4 600) return path;\n\nwrapper.c\n5efde212fc  70) die(\"Out of memory, malloc failed (tried to allocate %\" PRIuMAX \" bytes)\",\n5efde212fc  73) error(\"Out of memory, malloc failed (tried to allocate %\" PRIuMAX \" bytes)\",\n\nwt-status.c\n3a95f31d1c 2378) fd = repo_hold_locked_index(r, &lock_file, 0);\n1b0d968b34 2381) repo_update_index_if_able(r, &lock_file);\n\nCommits introducing uncovered code:\nÆvar Arnfjörð Bjarmason      97b202471: commit-graph write: use pack order when finding commits\nAlban Gruin      0566a4f68: sequencer: make sequencer_make_script() write its script to a strbuf\nAlban Gruin      2b71595d4: sequencer: changes in parse_insn_buffer()\nAlban Gruin      2dd989a69: rebase-interactive: append_todo_help() changes\nAlban Gruin      33bc1844f: sequencer: use edit_todo_list() in complete_action()\nAlban Gruin      3ebafef41: sequencer: refactor transform_todos() to work on a todo_list\nAlban Gruin      4d55dfd76: rebase-interactive: move transform_todo_file() to rebase--interactive.c\nAlban Gruin      5d94d5456: sequencer: make the todo_list structure public\nAlban Gruin      8414c890a: sequencer: refactor sequencer_add_exec_commands() to work on a todo_list\nAlban Gruin      98b29e060: sequencer: refactor skip_unnecessary_picks() to work on a todo_list\nAlban Gruin      c1c074e0c: sequencer: change complete_action() to use the refactored functions\nAlban Gruin      c27b32f0e: sequencer: refactor check_todo_list() to work on a todo_list\nAlban Gruin      cf18b3f6c: sequencer: introduce todo_list_write_to_file()\nAlban Gruin      d836079ec: sequencer: remove the 'arg' field from todo_item\nAlban Gruin      e5b1c9d92: rebase-interactive: rewrite edit_todo_list() to handle the initial edit\nAlban Gruin      febebd99b: sequencer: refactor rearrange_squash() to work on a todo_list\nAnders Waldenborg      18f8e8109: strbuf: separate callback for strbuf_expand:ing literals\nAnders Waldenborg      4681fe38e: pretty: allow showing specific trailers\nAnders Waldenborg      b755bf6f8: pretty: allow %(trailers) options with explicit value\nAnders Waldenborg      ced45aab7: pretty: add support for separator option in %(trailers)\nAnders Waldenborg      e9da5de76: pretty: add support for \"valueonly\" option in %(trailers)\nAnders Waldenborg      ffd7cae40: pretty: single return path in %(trailers) handling\nBarret Rhoden      07d04b919: blame: add a config option to mark ignored lines\nBarret Rhoden      e7973c851: blame: add the ability to ignore commits and their changes\nBarret Rhoden      ef644c415: Move init_skiplist() outside of fsck\nDerrick Stolee      3d036eb0d: pack-objects: create pack.useSparse setting\nDerrick Stolee      4f6d26b16: list-objects: consume sparse tree walk\nDerrick Stolee      d5d2e9357: revision: implement sparse algorithm\nDerrick Stolee      f1f5de442: revision: add mark_tree_uninteresting_sparse\nJeff King      240fb9b7a: remote-curl: tighten \"version 2\" check for smart-http\nJeff King      34a9469d6: remote-curl: refactor smart-http discovery\nJiang Xin      a338d1039: pack-redundant: consistent sort method\nJiang Xin      cb7e0336f: pack-redundant: rename pack_list.all_objects\nJoel Teichroeb      cdca49bc4: stash: convert drop and clear to builtin\nJoel Teichroeb      e1d01876a: stash: convert pop to builtin\nJoel Teichroeb      f596f3366: stash: convert branch to builtin\nJoel Teichroeb      f6bbd7812: stash: convert apply to builtin\nJohannes Schindelin      26799a208: stash: optionally use the scripted version again\nJohannes Schindelin      97f56073c: ident: add the ability to provide a \"fallback identity\"\nJohannes Schindelin      bec65d5b7: tests: add a special setup where stash.useBuiltin is off\nJosh Steadmon      6da1f1a92: protocol: advertise multiple supported versions\nJosh Steadmon      e586e7df7: remote-curl: die on server-side errors\nJunio C Hamano      5dde8fc6d: Merge branch 'ds/push-sparse-tree-walk' into pu\nJunio C Hamano      b6b4172bf: Merge branch 'nd/the-index-final' into pu\nLiam Beguin      0cce4a275: rebase -i -x: add exec commands via the rebase--helper\nLinus Torvalds      acdd37769: Add 'human' date format\nMartin Koegler      5efde212f: zlib.c: use size_t for size\nMatthew Kraai      ed5d77f7d: stash: fix segmentation fault when files were added with intent\nNguyễn Thái Ngọc Duy      059343267: diff.c: convert --no-prefix\nNguyễn Thái Ngọc Duy      06800238c: config.c: avoid git_path() in do_git_config_sequence()\nNguyễn Thái Ngọc Duy      08339886b: parse-options: avoid magic return codes\nNguyễn Thái Ngọc Duy      08d080bf7: diff.c: convert --word-diff\nNguyễn Thái Ngọc Duy      0d6caa2d0: merge-recursive.c: remove implicit dependency on the_index\nNguyễn Thái Ngọc Duy      0eb03c4cd: diff.c: convert --stat*\nNguyễn Thái Ngọc Duy      10e07ecc0: diff.c: convert -M|--find-renames\nNguyễn Thái Ngọc Duy      150fe065f: read-cache.c: remove the_* from index_has_changes()\nNguyễn Thái Ngọc Duy      1b0d968b3: read-cache.c: replace update_index_if_able with repo_&\nNguyễn Thái Ngọc Duy      1d18d7581: notes-utils.c: remove the_repository references\nNguyễn Thái Ngọc Duy      1d2890f4f: diff.c: convert --submodule\nNguyễn Thái Ngọc Duy      1d8598834: diff.c: convert --textconv\nNguyễn Thái Ngọc Duy      1efc2689d: diff.c: convert --diff-algorithm\nNguyễn Thái Ngọc Duy      2156b1fd0: diff.c: convert --patience\nNguyễn Thái Ngọc Duy      221d67669: diff.c: convert --color-moved\nNguyễn Thái Ngọc Duy      26c50430d: range-diff: use parse_options() instead of diff_opt_parse()\nNguyễn Thái Ngọc Duy      2ec5633ff: worktree.c: add get_worktree_config()\nNguyễn Thái Ngọc Duy      350a71f2f: diff.c: convert --relative\nNguyễn Thái Ngọc Duy      3a7a698e9: sha1-name.c: remove implicit dependency on the_index\nNguyễn Thái Ngọc Duy      3a95f31d1: repository.c: replace hold_locked_index() with repo_hold_locked_index()\nNguyễn Thái Ngọc Duy      3d810d186: diff.c: convert --output-*\nNguyễn Thái Ngọc Duy      447867144: cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch\nNguyễn Thái Ngọc Duy      5866e9ce9: diff.c: convert --find-object\nNguyễn Thái Ngọc Duy      58c7ef398: diff.c: convert --[no-]compact-summary\nNguyễn Thái Ngọc Duy      6643eb7bb: diff.c: convert -U|--unified\nNguyễn Thái Ngọc Duy      6c0ec4f72: diff.c: convert --line-prefix\nNguyễn Thái Ngọc Duy      6d0300b2e: diff.c: convert --binary\nNguyễn Thái Ngọc Duy      6f11fd5ed: config: add --move-to\nNguyễn Thái Ngọc Duy      7c33a67a2: diff.c: convert --color-moved-ws\nNguyễn Thái Ngọc Duy      8b70e4177: diff.c: convert --ws-error-highlight\nNguyễn Thái Ngọc Duy      8f7c7f555: config.c: add repo_config_set_worktree_gently()\nNguyễn Thái Ngọc Duy      8fc6b47cd: diff.c: convert --[no-]abbrev\nNguyễn Thái Ngọc Duy      963389f6e: diff --no-index: use parse_options() instead of diff_opt_parse()\nNguyễn Thái Ngọc Duy      97e53999c: diff.c: convert -C|--find-copies\nNguyễn Thái Ngọc Duy      9b4ae5190: parse-options: allow ll_callback with OPTION_CALLBACK\nNguyễn Thái Ngọc Duy      a12c1ff3a: config: factor out set_config_source_file()\nNguyễn Thái Ngọc Duy      afe77a4dd: diff.c: convert --word-diff-regex\nNguyễn Thái Ngọc Duy      b065b6607: diff.c: convert --anchored\nNguyễn Thái Ngọc Duy      b74a81799: diff.c: convert --diff-filter\nNguyễn Thái Ngọc Duy      b9b760ed1: diff.c: convert -B|--break-rewrites\nNguyễn Thái Ngọc Duy      c2dcec4fd: diff.c: convert --[no-]follow\nNguyễn Thái Ngọc Duy      d071ebcc8: diff.c: convert -S|-G\nNguyễn Thái Ngọc Duy      d7cf3a96e: merge-recursive.c: remove implicit dependency on the_repository\nNguyễn Thái Ngọc Duy      da9db54b3: diff.c: allow --no-color-moved-ws\nNguyễn Thái Ngọc Duy      dba093ddc: grep: use grep_opt->repo instead of explict repo argument\nNguyễn Thái Ngọc Duy      e1ff0a32e: read-cache.c: kill read_index()\nNguyễn Thái Ngọc Duy      f3b49b7f9: diff.c: convert --color-words\nNguyễn Thái Ngọc Duy      f8d10810d: diff.c: convert --dirstat and friends\nPaul-Sebastian Ungureanu      0c1599c33: strbuf.c: add `strbuf_join_argv()`\nPaul-Sebastian Ungureanu      168e6cff5: stash: optimize `get_untracked_files()` and `check_changes()`\nPaul-Sebastian Ungureanu      1f5a011d9: stash: convert create to builtin\nPaul-Sebastian Ungureanu      4e763fae8: sha1-name.c: add `get_oidf()` which acts like `get_oid()`\nPaul-Sebastian Ungureanu      51809c70c: stash: convert `stash--helper.c` into `stash.c`\nPaul-Sebastian Ungureanu      559edead8: stash: replace all `write-tree` child processes with API calls\nPaul-Sebastian Ungureanu      847eb0b0a: stash: convert store to builtin\nPaul-Sebastian Ungureanu      9a95010a1: stash: make push -q quiet\nPaul-Sebastian Ungureanu      9b77b07ba: stash: convert list to builtin\nPaul-Sebastian Ungureanu      b4493f269: stash: convert show to builtin\nPaul-Sebastian Ungureanu      bfc3fe33f: strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`\nPaul-Sebastian Ungureanu      cf5b27d69: stash: convert save to builtin\nPaul-Sebastian Ungureanu      fa38428f7: stash: convert push to builtin\nRené Scharfe      878056005: sequencer: factor out strbuf_read_file_or_whine()\nStephen P. Smith      6943bd42f: Add `human` format to test-tool\nStephen P. Smith      86177eb5c: Remove the proposed use of auto as secondary way to specify human\nSun Chao      e4e2c2884: pack-redundant: new algorithm to find min packs\n\n\n\nUncovered code in 'jch' not in 'next'\n----------------------------------------\n\nbuiltin/archive.c\n01f9ec64c8 builtin/archive.c  63) if (starts_with(reader.line, \"NACK \"))\n01f9ec64c8 builtin/archive.c  64) die(_(\"git archive: NACK %s\"), reader.line + 5);\n\nbuiltin/bisect--helper.c\n5e82c3dd22 builtin/bisect--helper.c 162) if (get_oid_commit(commit, &oid))\n5e82c3dd22 builtin/bisect--helper.c 163) return error(_(\"'%s' is not a valid commit\"), commit);\n5e82c3dd22 builtin/bisect--helper.c 164) strbuf_addstr(&branch, commit);\n5e82c3dd22 builtin/bisect--helper.c 172) strbuf_release(&branch);\n5e82c3dd22 builtin/bisect--helper.c 173) argv_array_clear(&argv);\n5e82c3dd22 builtin/bisect--helper.c 174) return error(_(\"could not check out original\"\n0f30233a11 builtin/bisect--helper.c 215) retval = error(_(\"Bad bisect_write argument: %s\"), state);\n0f30233a11 builtin/bisect--helper.c 216) goto finish;\n0f30233a11 builtin/bisect--helper.c 220) retval = error(_(\"couldn't get the oid of the rev '%s'\"), rev);\n0f30233a11 builtin/bisect--helper.c 221) goto finish;\n0f30233a11 builtin/bisect--helper.c 226) retval = -1;\n0f30233a11 builtin/bisect--helper.c 227) goto finish;\n0f30233a11 builtin/bisect--helper.c 232) retval = error_errno(_(\"couldn't open the file '%s'\"), git_path_bisect_log());\n0f30233a11 builtin/bisect--helper.c 233) goto finish;\n129a6cf344 builtin/bisect--helper.c 329) yesno = git_prompt(_(\"Are you sure [Y/n]? \"), PROMPT_ECHO);\n129a6cf344 builtin/bisect--helper.c 330) if (starts_with(yesno, \"N\") || starts_with(yesno, \"n\"))\n129a6cf344 builtin/bisect--helper.c 331) retval = -1;\n129a6cf344 builtin/bisect--helper.c 332) goto finish;\n129a6cf344 builtin/bisect--helper.c 338) retval = error(_(need_bisect_start_warning),\n450ebb7359 builtin/bisect--helper.c 389) return error(_(\"invalid argument %s for 'git bisect terms'.\\n\"\n06f5608c14 builtin/bisect--helper.c 404) return -1;\n06f5608c14 builtin/bisect--helper.c 407) retval = -1;\n06f5608c14 builtin/bisect--helper.c 408) goto finish;\n06f5608c14 builtin/bisect--helper.c 413) retval = -1;\n06f5608c14 builtin/bisect--helper.c 452) no_checkout = 1;\n06f5608c14 builtin/bisect--helper.c 474)  !one_of(arg, \"--term-good\", \"--term-bad\", NULL)) {\n06f5608c14 builtin/bisect--helper.c 475) return error(_(\"unrecognized option: '%s'\"), arg);\n06f5608c14 builtin/bisect--helper.c 510) if (get_oid(\"HEAD\", &head_oid))\n06f5608c14 builtin/bisect--helper.c 511) return error(_(\"bad HEAD - I need a HEAD\"));\n06f5608c14 builtin/bisect--helper.c 526) retval = error(_(\"checking out '%s' failed.\"\n06f5608c14 builtin/bisect--helper.c 547) return error(_(\"won't bisect on cg-seek'ed tree\"));\n06f5608c14 builtin/bisect--helper.c 550) return error(_(\"bad HEAD - strange symbolic ref\"));\n06f5608c14 builtin/bisect--helper.c 558) return -1;\n06f5608c14 builtin/bisect--helper.c 576) retval = -1;\n06f5608c14 builtin/bisect--helper.c 577) goto finish;\n06f5608c14 builtin/bisect--helper.c 588) retval = -1;\n06f5608c14 builtin/bisect--helper.c 589) goto finish;\n06f5608c14 builtin/bisect--helper.c 600) retval = -1;\n5e82c3dd22 builtin/bisect--helper.c 677) return error(_(\"--bisect-reset requires either no argument or a commit\"));\n0f30233a11 builtin/bisect--helper.c 681) return error(_(\"--bisect-write requires either 4 or 5 arguments\"));\n4fbdbd5bff builtin/bisect--helper.c 687) return error(_(\"--check-and-set-terms requires 3 arguments\"));\n129a6cf344 builtin/bisect--helper.c 693) return error(_(\"--bisect-next-check requires 2 or 3 arguments\"));\n\nbuiltin/branch.c\n711d28e2e4 builtin/branch.c 370) strbuf_addf(&local, \"%s%%(if:notequals=*)%%(HEAD)%%(then)%%(if)%%(worktreepath)%%(then)%%(worktreepath) %%(end)%%(end)%s\",\n0ecb1fc726 builtin/branch.c 460) die(_(\"could not resolve HEAD\"));\n0ecb1fc726 builtin/branch.c 466) die(_(\"HEAD (%s) points outside of refs/heads/\"), refname);\n\nbuiltin/multi-pack-index.c\n334e9745a6 49) die(_(\"--batch-size option is only for 'repack' subcommand\"));\n\nbuiltin/pull.c\nb19eee9066 647) argv_array_push(&args, opt_cleanup);\n\nbuiltin/rebase.c\n21853626ea  258) write_file(state_dir_path(\"verbose\", opts), \"%s\", \"\");\n21853626ea  260) write_file(state_dir_path(\"strategy\", opts), \"%s\",\n21853626ea  263) write_file(state_dir_path(\"strategy_opts\", opts), \"%s\",\n21853626ea  270) write_file(state_dir_path(\"gpg_sign_opt\", opts), \"%s\",\n21853626ea  273) write_file(state_dir_path(\"strategy\", opts), \"--signoff\");\nc5233708c5  396) ret = -1;\nc5233708c5  397) goto leave_reset_head;\nc5233708c5  401) ret = error(_(\"could not determine HEAD revision\"));\nc5233708c5  402) goto leave_reset_head;\nc5233708c5  423) ret = error(_(\"could not read index\"));\nc5233708c5  424) goto leave_reset_head;\nc5233708c5  428) ret = error(_(\"failed to find tree of %s\"),\nc5233708c5  430) goto leave_reset_head;\nc5233708c5  434) ret = error(_(\"failed to find tree of %s\"), oid_to_hex(oid));\nc5233708c5  435) goto leave_reset_head;\nc5233708c5  447) ret = error(_(\"could not write index\"));\nc5233708c5  448) goto leave_reset_head;\nc5233708c5  466) } else if (old_orig)\nc5233708c5  467) delete_ref(NULL, \"ORIG_HEAD\", old_orig, 0);\n21853626ea  542) argv_array_push(&am.args, opts->gpg_sign_opt);\n21853626ea  574) status = error_errno(_(\"could not open '%s' for writing\"),\n21853626ea  576) free(rebased_patches);\n21853626ea  577) argv_array_clear(&am.args);\n21853626ea  578) return status;\n21853626ea  587) argv_array_split(&format_patch.args,\n21853626ea  588)  opts->git_format_patch_opt.buf);\n21853626ea  596) unlink(rebased_patches);\n21853626ea  597) free(rebased_patches);\n21853626ea  598) argv_array_clear(&am.args);\n21853626ea  600) reset_head(&opts->orig_head, \"checkout\", opts->head_name, 0,\n21853626ea  602) error(_(\"\\ngit encountered an error while preparing the \"\n21853626ea  609) strbuf_release(&revisions);\n21853626ea  610) return status;\n21853626ea  616) status = error_errno(_(\"could not open '%s' for reading\"),\n21853626ea  618) free(rebased_patches);\n21853626ea  619) argv_array_clear(&am.args);\n21853626ea  620) return status;\n\nbuiltin/receive-pack.c\n01f9ec64c8 builtin/receive-pack.c 1587)     reader->line + 8);\n01f9ec64c8 builtin/receive-pack.c 1621) die(\"protocol error: got an unexpected packet\");\n\nbuiltin/remote.c\nf39a9c6547 builtin/remote.c 1551) die(_(\"--save-to-push cannot be used with other options\"));\nf39a9c6547 builtin/remote.c 1575) die(_(\"--save-to-push can only be used when only one url is defined\"));\n\ncommit-graph.c\naa658574bf  127) return NULL;\naa658574bf  130) return NULL;\naa658574bf  186) free(graph);\naa658574bf  187) return NULL;\naa658574bf  222) free(graph);\naa658574bf  223) return NULL;\n64415806e8  933) display_progress(oids.progress, approx_nr_objects);\n\nconfig.c\n7e43b32b58 1488) return git_ident_config(var, value, cb);\n7e43b32b58 1491) return git_ident_config(var, value, cb);\n\nfetch-pack.c\n01f9ec64c8  154) die(_(\"git fetch-pack: expected a flush packet after shallow list\"));\n01f9ec64c8  358) die(_(\"invalid shallow line: %s\"), reader.line);\n01f9ec64c8  364) die(_(\"invalid unshallow line: %s\"), reader.line);\n01f9ec64c8  366) die(_(\"object not found: %s\"), reader.line);\n01f9ec64c8  369) die(_(\"error in object: %s\"), reader.line);\n01f9ec64c8  371) die(_(\"no shallow found: %s\"), reader.line);\n01f9ec64c8  374) die(_(\"expected shallow/unshallow, got %s\"), reader.line);\n0bbc0bc574 1128) packet_buf_write(&req_buf, \"sideband-all\");\n0bbc0bc574 1350) reader.use_sideband = 1;\n0bbc0bc574 1351) reader.me = \"fetch-pack\";\n\nhttp-walker.c\n514c5fdd03 http-walker.c 550) loose_object_path(the_repository, &buf, &req->oid);\n\nident.c\n7e43b32b58 373) email = git_author_email.buf;\n7e43b32b58 375) email = git_committer_email.buf;\n7e43b32b58 394) name = git_author_name.buf;\n7e43b32b58 396) name = git_committer_name.buf;\n7e43b32b58 504) if (!value)\n7e43b32b58 505) return config_error_nonbool(var);\n7e43b32b58 506) strbuf_reset(&git_author_name);\n7e43b32b58 507) strbuf_addstr(&git_author_name, value);\n7e43b32b58 508) author_ident_explicitly_given |= IDENT_NAME_GIVEN;\n7e43b32b58 509) ident_config_given |= IDENT_NAME_GIVEN;\n7e43b32b58 510) return 0;\n7e43b32b58 514) if (!value)\n7e43b32b58 515) return config_error_nonbool(var);\n7e43b32b58 516) strbuf_reset(&git_author_email);\n7e43b32b58 517) strbuf_addstr(&git_author_email, value);\n7e43b32b58 518) author_ident_explicitly_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 519) ident_config_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 520) return 0;\n7e43b32b58 524) if (!value)\n7e43b32b58 525) return config_error_nonbool(var);\n7e43b32b58 526) strbuf_reset(&git_committer_name);\n7e43b32b58 527) strbuf_addstr(&git_committer_name, value);\n7e43b32b58 528) committer_ident_explicitly_given |= IDENT_NAME_GIVEN;\n7e43b32b58 529) ident_config_given |= IDENT_NAME_GIVEN;\n7e43b32b58 530) return 0;\n7e43b32b58 534) if (!value)\n7e43b32b58 535) return config_error_nonbool(var);\n7e43b32b58 536) strbuf_reset(&git_committer_email);\n7e43b32b58 537) strbuf_addstr(&git_committer_email, value);\n7e43b32b58 538) committer_ident_explicitly_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 539) ident_config_given |= IDENT_MAIL_GIVEN;\n7e43b32b58 540) return 0;\n\nmidx.c\ne7a330ee26  428) close_pack(packs->info[packs->nr].p);\ne7a330ee26  429) FREE_AND_NULL(packs->info[packs->nr].p);\n14b7185175  815) error(_(\"did not see pack-file %s to drop\"),\n14b7185175  817) drop_index++;\n14b7185175  818) missing_drops++;\n14b7185175  819) i--;\n14b7185175  826) result = 1;\n14b7185175  827) goto cleanup;\n14b7185175 1073) return 0;\n14b7185175 1088) continue;\n14b7185175 1091) continue;\n17d0bf5a7d 1142) return 0;\n17d0bf5a7d 1151) continue;\n17d0bf5a7d 1164) continue;\n17d0bf5a7d 1187) error(_(\"could not start pack-objects\"));\n17d0bf5a7d 1188) result = 1;\n17d0bf5a7d 1189) goto cleanup;\n17d0bf5a7d 1206) error(_(\"could not finish pack-objects\"));\n17d0bf5a7d 1207) result = 1;\n17d0bf5a7d 1208) goto cleanup;\n\npackfile.c\n9133688752  369) strbuf_release(&buf);\n9133688752  370) return;\n\npkt-line.c\n0bbc0bc574 505) if (demultiplex_sideband(reader->me, reader->buffer,\n0bbc0bc574 508) break;\n0bbc0bc574 509) }\n\nread-cache.c\nee70c12820 1736) if (advice_unknown_index_extension) {\nee70c12820 1737) warning(_(\"ignoring optional %.4s index extension\"), ext);\nee70c12820 1738) advise(_(\"This is likely due to the file having been written by a newer\\n\"\n\nref-filter.c\na9fb549b1d  467) return 0;\n\nremote-curl.c\n01f9ec64c8  427) die(\"invalid server response; got '%s'\", reader.line);\n01f9ec64c8  439) }\n\nsend-pack.c\n01f9ec64c8 143) return error(_(\"unable to parse remote unpack status: %s\"), reader->line);\n01f9ec64c8 162) error(\"invalid ref status from remote: %s\", reader->line);\n01f9ec64c8 579) receive_unpack_status(&reader);\n\nsequencer.c\n899b49c446 2394) opts->quiet = 1;\n\nsha1-file.c\n514c5fdd03 sha1-file.c 1291) status = error(_(\"unable to parse %s header\"), oid_to_hex(oid));\n00a7760e81 sha1-file.c 2305) the_hash_algo->final_fn(real_oid.hash, &c);\n00a7760e81 sha1-file.c 2306) if (!oideq(expected_oid, &real_oid)) {\n\nsideband.c\nfbd76cd450 128) suffix = ANSI_SUFFIX;\nfbd76cd450 138) strbuf_addf(scratch,\nfbd76cd450 140)     scratch->len ? \"\\n\" : \"\", me);\nfbd76cd450 141) *sideband_type = SIDEBAND_PROTOCOL_ERROR;\nfbd76cd450 142) goto cleanup;\n0bbc0bc574 150) die(\"remote error: %s\", buf + 1);\nfbd76cd450 195) strbuf_addf(scratch, \"%s%s: protocol error: bad band #%d\",\nfbd76cd450 196)     scratch->len ? \"\\n\" : \"\", me, band);\nfbd76cd450 197) *sideband_type = SIDEBAND_PROTOCOL_ERROR;\nfbd76cd450 198) break;\n0bbc0bc574 203) die(\"%s\", scratch->buf);\n\nupload-pack.c\n01f9ec64c8  432) die(\"git upload-pack: expected SHA1 list, got '%s'\", reader->line);\n0bbc0bc574 1066) allow_sideband_all = git_config_bool(var, value);\n07c3c2aa16 1306)      allow_sideband_all) &&\n07c3c2aa16 1307)     !strcmp(arg, \"sideband-all\")) {\n0bbc0bc574 1308) data->writer.use_sideband = 1;\n0bbc0bc574 1309) continue;\nbc2e795cea 1441) deepen(&data->writer, INFINITE_DEPTH, data->deepen_relative,\n07c3c2aa16 1544)    &allow_sideband_all_value) &&\n\nworktree.c\nebefff3c73 465) clear_repository_format(&format);\n\nwrapper.c\ne3b1e3bdc0 701) die_errno(_(\"could not stat %s\"), filename);\n\nCommits introducing uncovered code:\nÆvar Arnfjörð Bjarmason      64415806e: commit-graph write: show progress for object search\nDaniels Umanovskis      0ecb1fc72: branch: introduce --show-current display option\nDenton Liu      b19eee906: merge: add scissors line on merge conflict\nDenton Liu      f39a9c654: remote: add --save-to-push option to git remote set-url\nDerrick Stolee      14b718517: multi-pack-index: implement 'expire' subcommand\nDerrick Stolee      17d0bf5a7: midx: implement midx_repack()\nDerrick Stolee      334e9745a: multi-pack-index: prepare 'repack' subcommand\nDerrick Stolee      913368875: repack: refactor pack deletion for future use\nDerrick Stolee      e7a330ee2: midx: refactor permutation logic and pack sorting\nElijah Newren      899b49c44: git-rebase, sequencer: extend --quiet option for the interactive machinery\nJeff King      00a7760e8: sha1-file: modernize loose header/stream functions\nJeff King      514c5fdd0: sha1-file: modernize loose object file functions\nJohannes Schindelin      21853626e: built-in rebase: call `git am` directly\nJohannes Schindelin      c5233708c: rebase: move `reset_head()` into a better spot\nJonathan Nieder      ee70c1282: index: offer advice for unknown index extensions\nJonathan Tan      07c3c2aa1: tests: define GIT_TEST_SIDEBAND_ALL\nJonathan Tan      0bbc0bc57: {fetch,upload}-pack: sideband v2 fetch response\nJonathan Tan      bc2e795ce: pkt-line: introduce struct packet_writer\nJonathan Tan      fbd76cd45: sideband: reverse its dependency on pkt-line\nJosh Steadmon      aa658574b: commit-graph, fuzz: add fuzzer for commit-graph\nMartin Ågren      ebefff3c7: setup: add `clear_repository_format()`\nMasaya Suzuki      01f9ec64c: Use packet_reader instead of packet_read_line\nNickolai Belakovski      711d28e2e: branch: add an extra verbose output displaying worktree path for checked out branch\nNickolai Belakovski      a9fb549b1: ref-filter: add worktreepath atom\nPranit Bauva      06f5608c1: bisect--helper: `bisect_start` shell function partially in C\nPranit Bauva      0f30233a1: bisect--helper: `bisect_write` shell function in C\nPranit Bauva      129a6cf34: bisect--helper: `bisect_next_check` shell function in C\nPranit Bauva      450ebb735: bisect--helper: `get_terms` & `bisect_terms` shell function in C\nPranit Bauva      4fbdbd5bf: bisect--helper: `check_and_set_terms` shell function in C\nPranit Bauva      5e82c3dd2: bisect--helper: `bisect_reset` shell function in C\nPranit Bauva      e3b1e3bdc: wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()\nWilliam Hubbs      7e43b32b5: Add author and committer configuration settings\n\n\n\nUncovered code in 'next' not in 'master'\n--------------------------------------------\n\nbuiltin/checkout.c\n091e04bc8c builtin/checkout.c  302) return;\n091e04bc8c builtin/checkout.c 1268) die(_(\"'%s' cannot be used with switching branches\"),\n\nbuiltin/fetch-pack.c\n4316ff3068 builtin/fetch-pack.c 226) get_remote_refs(fd[1], &reader, &ref, 0, NULL, NULL);\n4316ff3068 builtin/fetch-pack.c 227) break;\n\nbuiltin/fetch.c\ne01378753d builtin/fetch.c 1479) die(_(\"--filter can only be used with the remote \"\ne01378753d builtin/fetch.c 1648) die(_(\"--filter can only be used with the remote \"\n\nbuiltin/rebase.c\n81ef8ee75d  773) return -1;\nd421afa0c6 1258) die(_(\"--reschedule-failed-exec requires an interactive rebase\"));\nd421afa0c6 1296) die(_(\"error: cannot combine '--preserve-merges' with \"\n\ndiff.c\nb73bcbac4a  308) ret = 0;\n21536d077f  812)        (s[off] == '\\r' && off < len - 1))\n21536d077f  813) off++;\nb73bcbac4a 5112) options->color_moved_ws_handling = 0;\n\nentry.c\nhex.c\n47edb64997  93) char *sha1_to_hex_r(char *buffer, const unsigned char *sha1)\n47edb64997  95) return hash_to_hex_algop_r(buffer, sha1, &hash_algos[GIT_HASH_SHA1]);\n47edb64997 116) char *hash_to_hex(const unsigned char *hash)\n47edb64997 118) return hash_to_hex_algop(hash, the_hash_algo);\n\nhttp-push.c\nea82b2a085 1314) p = process_tree(lookup_tree(the_repository, &entry.oid),\n\nhttp.c\ne6cf87b12d 1999) if (fflush(result)) {\ne6cf87b12d 2000) error_errno(\"unable to flush a file\");\ne6cf87b12d 2001) return HTTP_START_FAILED;\ne6cf87b12d 2003) rewind(result);\ne6cf87b12d 2004) if (ftruncate(fileno(result), 0) < 0) {\ne6cf87b12d 2005) error_errno(\"unable to truncate a file\");\ne6cf87b12d 2006) return HTTP_START_FAILED;\ne6cf87b12d 2008) break;\n\nlist-objects-filter.c\nc813a7c35f 199) return;\n\nmatch-trees.c\nf55ac4311a 231) hashcpy(tree_oid.hash, rewrite_here);\nf55ac4311a 232) status = splice_tree(&tree_oid, subpath, oid2, &subtree);\n\npretty.c\nad6f028f06 1204) return 0;\n\nremote-curl.c\nb79bdd8c12  566) return size;\n\nsha1-file.c\n2f90b9d9b4 sha1-file.c  172) int hash_algo_by_name(const char *name)\n2f90b9d9b4 sha1-file.c  175) if (!name)\n2f90b9d9b4 sha1-file.c  176) return GIT_HASH_UNKNOWN;\n2f90b9d9b4 sha1-file.c  177) for (i = 1; i < GIT_HASH_NALGOS; i++)\n2f90b9d9b4 sha1-file.c  178) if (!strcmp(name, hash_algos[i].name))\n2f90b9d9b4 sha1-file.c  179) return i;\n2f90b9d9b4 sha1-file.c  180) return GIT_HASH_UNKNOWN;\n2f90b9d9b4 sha1-file.c  183) int hash_algo_by_id(uint32_t format_id)\n2f90b9d9b4 sha1-file.c  186) for (i = 1; i < GIT_HASH_NALGOS; i++)\n2f90b9d9b4 sha1-file.c  187) if (format_id == hash_algos[i].format_id)\n2f90b9d9b4 sha1-file.c  188) return i;\n2f90b9d9b4 sha1-file.c  189) return GIT_HASH_UNKNOWN;\n\nsubmodule.c\n26f80ccfc1 1398) strbuf_release(&gitdir);\nbe76c21282 1521) struct fetch_task *task = task_cb;\nbe76c21282 1525) fetch_task_release(task);\n\ntree-walk.c\n0a3faa45b1  530) oidcpy(result, &oid);\n\ntree.c\n60c38b9e4a 104) commit = lookup_commit(r, &entry.oid);\n\nupload-pack.c\n87c2d9d310  147) sq_quote_buf(&buf, expanded_filter_spec.buf);\n\nCommits introducing uncovered code:\nbrian m. carlson      0a3faa45b: tree-walk: copy object ID before use\nbrian m. carlson      2f90b9d9b: sha1-file: provide functions to look up hash algorithms\nbrian m. carlson      47edb6499: hex: introduce functions to print arbitrary hashes\nbrian m. carlson      ea82b2a08: tree-walk: store object_id in a separate member\nbrian m. carlson      f55ac4311: match-trees: use hashcpy to splice trees\nChristian Couder      e01378753: fetch: fix extensions.partialclone name in error message\nIssac Trotts      ad6f028f0: log: add %S option (like --source) to log --format\nJohannes Schindelin      81ef8ee75: rebase: introduce a shortcut for --reschedule-failed-exec\nJohannes Schindelin      d421afa0c: rebase: introduce --reschedule-failed-exec\nJonathan Tan      4316ff306: fetch-pack: support protocol version 2\nJosh Steadmon      87c2d9d31: filter-options: expand scaled numbers\nJunio C Hamano      60c38b9e4: Merge branch 'bc/tree-walk-oid' into next\nMasaya Suzuki      b79bdd8c1: remote-curl: unset CURLOPT_FAILONERROR\nMasaya Suzuki      e6cf87b12: http: enable keep_error for HTTP requests\nMatthew DeVore      c813a7c35: list-objects-filter: teach tree:# how to handle >0\nPhillip Wood      21536d077: diff --color-moved-ws: modify allow-indentation-change\nPhillip Wood      b73bcbac4: diff: allow --no-color-moved-ws\nStefan Beller      26f80ccfc: submodule: migrate get_next_submodule to use repository structs\nStefan Beller      be76c2128: fetch: ensure submodule objects fetched\nThomas Gummerer      091e04bc8: checkout: introduce --{,no-}overlay option\n\n\n\nUncovered code in 'master' not in 'master@{1}'\n----------------------------------------------------\n\nbuiltin/submodule--helper.c\nbuiltin/worktree.c\n00a6d4d1d2 752) found_submodules = 1;\n00a6d4d1d2 753) break;\n\ncommit-graph.c\nref-filter.c\n1867ce6cbe  236) oi_deref.info.sizep = &oi_deref.size;\n1867ce6cbe  245) return strbuf_addf_ret(err, -1, _(\"unrecognized %%(objectsize) argument: %s\"), arg);\n33311fa1ad  253) return strbuf_addf_ret(err, -1, _(\"%%(deltabase) does not take arguments\"));\n\nsetup.c\n07098b81a4 1093) if (!nongit_ok)\n07098b81a4 1094) die(_(\"not a git repository (or any parent up to mount point %s)\\n\"\n07098b81a4 1097) *nongit_ok = 1;\n07098b81a4 1098) break;\n\ntransport-helper.c\n3b3357626e 1029) static int has_attribute(const char *attrs, const char *attr)\n\nCommits introducing uncovered code:\nErin Dahlgren      07098b81a: Simplify handling of setup_git_directory_gently() failure cases.\nNguyễn Thái Ngọc Duy      00a6d4d1d: worktree: allow to (re)move worktrees with uninitialized submodules\nNguyễn Thái Ngọc Duy      3b3357626: style: the opening '{' of a function is in a separate line\nOlga Telezhnaya      1867ce6cb: ref-filter: add objectsize:disk option\nOlga Telezhnaya      33311fa1a: ref-filter: add deltabase option\n"}]}