1. 07 Mar, 2019 2 commits
  2. 29 Jan, 2019 1 commit
    • Alban Gruin's avatar
      sequencer: refactor check_todo_list() to work on a todo_list · 6ca89c6f
      Alban Gruin authored
      This refactors check_todo_list() to work on a todo_list to avoid
      redundant reads and writes to the disk.  The function is renamed
      todo_list_check().  The parsing of the two todo lists is left to the
      caller.
      
      As rebase -p still need to check the todo list from the disk, a new
      function is introduced, check_todo_list_from_file().  It reads the file
      from the disk, parses it, pass the todo_list to todo_list_check(), and
      writes it back to the disk.
      
      As get_missing_commit_check_level() and the enum
      missing_commit_check_level are no longer needed inside of sequencer.c,
      they are moved to rebase-interactive.c, and made static again.
      Signed-off-by: 's avatarAlban Gruin <alban.gruin@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      6ca89c6f
  3. 12 Nov, 2018 1 commit
  4. 29 Aug, 2018 1 commit
    • Alban Gruin's avatar
      rebase -i: remove unused modes and functions · 91f0d95d
      Alban Gruin authored
      This removes the modes `--skip-unnecessary-picks`, `--append-todo-help`,
      and `--checkout-onto` from rebase--helper.c, the functions of
      git-rebase--interactive.sh that were rendered useless by the rewrite of
      complete_action(), and append_todo_help_to_file() from
      rebase-interactive.c.
      
      skip_unnecessary_picks() and checkout_onto() becomes static, as they are
      only used inside of the sequencer.
      Signed-off-by: 's avatarAlban Gruin <alban.gruin@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      91f0d95d
  5. 10 Aug, 2018 3 commits
    • Alban Gruin's avatar
      sequencer: refactor append_todo_help() to write its message to a buffer · a9f5476f
      Alban Gruin authored
      This refactors append_todo_help() to write its message to a buffer
      instead of the todo-list.  This is needed for the rewrite of
      complete_action(), which will come after the next commit.
      
      As rebase--helper still needs the file manipulation part of
      append_todo_help(), it is extracted to a temporary function,
      append_todo_help_to_file().  This function will go away after the
      rewrite of complete_action().
      Signed-off-by: 's avatarAlban Gruin <alban.gruin@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      a9f5476f
    • Alban Gruin's avatar
      rebase -i: rewrite the edit-todo functionality in C · 64a43cbd
      Alban Gruin authored
      This rewrites the edit-todo functionality from shell to C.
      
      To achieve that, a new command mode, `edit-todo`, is added, and the
      `write-edit-todo` flag is removed, as the shell script does not need to
      write the edit todo help message to the todo list anymore.
      
      The shell version is then stripped in favour of a call to the helper.
      Signed-off-by: 's avatarAlban Gruin <alban.gruin@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      64a43cbd
    • Alban Gruin's avatar
      rebase -i: rewrite append_todo_help() in C · 145e05ac
      Alban Gruin authored
      This rewrites append_todo_help() from shell to C. It also incorporates
      some parts of initiate_action() and complete_action() that also write
      help texts to the todo file.
      
      This also introduces the source file rebase-interactive.c. This file
      will contain functions necessary for interactive rebase that are too
      specific for the sequencer, and is part of libgit.a.
      
      Two flags are added to rebase--helper.c: one to call
      append_todo_help() (`--append-todo-help`), and another one to tell
      append_todo_help() to write the help text suited for the edit-todo
      mode (`--write-edit-todo`).
      
      Finally, append_todo_help() is removed from git-rebase--interactive.sh
      to use `rebase--helper --append-todo-help` instead.
      Signed-off-by: 's avatarAlban Gruin <alban.gruin@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      145e05ac