Merge branch 'js/rebase-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2019 20:19:40 +0000 (13:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2019 20:19:40 +0000 (13:19 -0700)
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

1  2 
Makefile
builtin/rebase.c
diff --combined Makefile
index 8a7e2353520ddd7e0c8074d2b32d0441d97c1597,9fc617e38f99d16a6e4382297a7bb69530007982..6c3bfb1733e2b2851e4996506dd544a47534f037
+++ 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 effc2709a8bbe120c4da832927ea22fb7967168f,9c52144fc46d705d1a7eb10de9d79f673da42b23..b8116db4876b1a353911a78d97ecd57370df8192
@@@ -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";
        }
  
        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;
        }