Skip to content

Commit 25d4e02

Browse files
nasamuffingitster
authored andcommitted
rebase: convert pre-rebase to use hook.h
Move the pre-rebase hook away from run-command.h to and over to the new hook.h library. Since this hook needs arguments introduce a run_hooksl() wrapper, like run_hooks(), but it takes varargs. Signed-off-by: Emily Shaffer <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Acked-by: Emily Shaffer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ab81cf2 commit 25d4e02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/rebase.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "sequencer.h"
2929
#include "rebase-interactive.h"
3030
#include "reset.h"
31+
#include "hook.h"
3132

3233
#define DEFAULT_REFLOG_ACTION "rebase"
3334

@@ -1712,7 +1713,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
17121713

17131714
/* If a hook exists, give it a chance to interrupt*/
17141715
if (!ok_to_skip_pre_rebase &&
1715-
run_hook_le(NULL, "pre-rebase", options.upstream_arg,
1716+
run_hooks_l("pre-rebase", options.upstream_arg,
17161717
argc ? argv[0] : NULL, NULL))
17171718
die(_("The pre-rebase hook refused to rebase."));
17181719

0 commit comments

Comments
 (0)