From: Junio C Hamano Date: Thu, 13 Jun 2019 20:19:40 +0000 (-0700) Subject: Merge branch 'js/rebase-cleanup' X-Git-Tag: v2.23.0-rc0~137 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ed7f8acbaa3d986a8b4e8d625b2f54355ce15ef0?ds=inline;hp=-c Merge branch 'js/rebase-cleanup' Update supporting parts of "git rebase" to remove code that should no longer be used. * js/rebase-cleanup: rebase: fold git-rebase--common into the -p backend sequencer: the `am` and `rebase--interactive` scripts are gone .gitignore: there is no longer a built-in `git-rebase--interactive` t3400: stop referring to the scripted rebase Drop unused git-rebase--am.sh --- ed7f8acbaa3d986a8b4e8d625b2f54355ce15ef0 diff --combined Makefile index 8a7e235352,9fc617e38f..6c3bfb1733 --- a/Makefile +++ b/Makefile @@@ -624,8 -624,6 +624,6 @@@ SCRIPT_SH += git-web--browse.s SCRIPT_LIB += git-mergetool--lib SCRIPT_LIB += git-parse-remote - SCRIPT_LIB += git-rebase--am - SCRIPT_LIB += git-rebase--common SCRIPT_LIB += git-rebase--preserve-merges SCRIPT_LIB += git-sh-setup SCRIPT_LIB += git-sh-i18n @@@ -1171,11 -1169,8 +1169,11 @@@ PTHREAD_CFLAGS SPARSE_FLAGS ?= SP_EXTRA_FLAGS = -# For the 'coccicheck' target +# For the 'coccicheck' target; setting SPATCH_BATCH_SIZE higher will +# usually result in less CPU usage at the cost of higher peak memory. +# Setting it to 0 will feed all files in a single spatch invocation. SPATCH_FLAGS = --all-includes --patch . +SPATCH_BATCH_SIZE = 1 include config.mak.uname -include config.mak.autogen @@@ -2810,14 -2805,12 +2808,14 @@@ endi %.cocci.patch: %.cocci $(COCCI_SOURCES) @echo ' ' SPATCH $<; \ - ret=0; \ - for f in $(COCCI_SOURCES); do \ - $(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS) || \ - { ret=$$?; break; }; \ - done >$@+ 2>$@.log; \ - if test $$ret != 0; \ + if test $(SPATCH_BATCH_SIZE) = 0; then \ + limit=; \ + else \ + limit='-n $(SPATCH_BATCH_SIZE)'; \ + fi; \ + if ! echo $(COCCI_SOURCES) | xargs $$limit \ + $(SPATCH) --sp-file $< $(SPATCH_FLAGS) \ + >$@+ 2>$@.log; \ then \ cat $@.log; \ exit 1; \ diff --combined builtin/rebase.c index effc2709a8,9c52144fc4..b8116db487 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@@ -508,7 -508,7 +508,7 @@@ int cmd_rebase__interactive(int argc, c if (argc == 1) usage_with_options(builtin_rebase_interactive_usage, options); - argc = parse_options(argc, argv, NULL, options, + argc = parse_options(argc, argv, prefix, options, builtin_rebase_interactive_usage, PARSE_OPT_KEEP_ARGV0); if (!is_null_oid(&squash_onto)) @@@ -1153,10 -1153,6 +1153,6 @@@ static int run_specific_rebase(struct r } switch (opts->type) { - case REBASE_AM: - backend = "git-rebase--am"; - backend_func = "git_rebase__am"; - break; case REBASE_PRESERVE_MERGES: backend = "git-rebase--preserve-merges"; backend_func = "git_rebase__preserve_merges"; @@@ -1167,8 -1163,7 +1163,7 @@@ } strbuf_addf(&script_snippet, - ". git-sh-setup && . git-rebase--common &&" - " . %s && %s", backend, backend_func); + ". git-sh-setup && . %s && %s", backend, backend_func); argv[0] = script_snippet.buf; status = run_command_v_opt(argv, RUN_USING_SHELL); @@@ -1203,7 -1198,7 +1198,7 @@@ static int rebase_config(const char *va if (git_config_bool(var, value)) opts->flags |= REBASE_DIFFSTAT; else - opts->flags &= !REBASE_DIFFSTAT; + opts->flags &= ~REBASE_DIFFSTAT; return 0; }