diff options
author | Alban Gruin <alban.gruin@gmail.com> | 2018-08-10 18:51:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-10 11:56:22 -0700 |
commit | d4ed5d7713c779487a52d30e83185a056c4bf023 (patch) | |
tree | 849af7905191b65d6f02495b00c94e652682273e /builtin | |
parent | sequencer: refactor append_todo_help() to write its message to a buffer (diff) | |
download | tgif-d4ed5d7713c779487a52d30e83185a056c4bf023.tar.xz |
sequencer: change the way skip_unnecessary_picks() returns its result
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a struct object_id, as the rewrite of complete_action()
(to come in the next commit) will need it.
rebase--helper then is modified to fit this change.
Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rebase--helper.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c index 313092c465..bed3dd2b95 100644 --- a/builtin/rebase--helper.c +++ b/builtin/rebase--helper.c @@ -90,8 +90,14 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix) return !!transform_todos(flags); if (command == CHECK_TODO_LIST && argc == 1) return !!check_todo_list(); - if (command == SKIP_UNNECESSARY_PICKS && argc == 1) - return !!skip_unnecessary_picks(); + if (command == SKIP_UNNECESSARY_PICKS && argc == 1) { + struct object_id oid; + int ret = skip_unnecessary_picks(&oid); + + if (!ret) + puts(oid_to_hex(&oid)); + return !!ret; + } if (command == REARRANGE_SQUASH && argc == 1) return !!rearrange_squash(); if (command == ADD_EXEC && argc == 2) |