Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/builtin/apply.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / builtin / apply.c` 51 lines ยท 1125 bytes Raw Blame History 1 #define USE_THE_REPOSITORY_VARIABLE 2 #include "builtin.h" 3 #include "gettext.h" 4 #include "hash.h" 5 #include "apply.h" 6 7 static const char * const apply_usage[] = { 8 N_("git apply [] [...]"), 9 NULL 10 }; 11 12 int cmd_apply(int argc, 13 const char **argv, 14 const char *prefix, 15 struct repository *repo) 16 { 17 int force_apply = 0; 18 int options = 0; 19 int ret; 20 struct apply_state state; 21 22 if (init_apply_state(&state, the_repository, prefix)) 23 exit(128); 24 25 /* 26 * We could to redo the "apply.c" machinery to make this 27 * arbitrary fallback unnecessary, but it is dubious that it 28 * is worth the effort. 29 * cf. https://lore.kernel.org/git/xmqqcypfcmn4.fsf@gitster.g/ 30 */ 31 if (!the_hash_algo) 32 repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT); 33 34 argc = apply_parse_options(argc, argv, 35 &state, &force_apply, &options, 36 apply_usage); 37 38 if (repo) { 39 prepare_repo_settings(repo); 40 repo->settings.command_requires_full_index = 0; 41 } 42 43 if (check_apply_state(&state, force_apply)) 44 exit(128); 45 46 ret = apply_all_patches(&state, argc, argv, options); 47 48 clear_apply_state(&state); 49 50 return ret; 51 }