Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-29 22:39:13 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-29 22:39:14 +0300
commit38dac334d78fd8f0568180b714554bee1b23b6a0 (patch)
tree1a2c48b62b2f872dc345806b5a2ac8dfc4d08766
parentc3d4c20c7d862fb168b4b2126443e13c55737507 (diff)
parent80dfc9242ebaba357ffedececd88641a1a752411 (diff)
Merge branch 'js/rebase-cleanup'
A few leftover cleanup to "git rebase" in C. * js/rebase-cleanup: git: mark cmd_rebase as requiring a worktree rebase: fix white-space
-rw-r--r--builtin/rebase.c6
-rw-r--r--git.c7
2 files changed, 2 insertions, 11 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 95d34223e9..670096c065 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1492,10 +1492,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
usage_with_options(builtin_rebase_usage,
builtin_rebase_options);
- prefix = setup_git_directory();
- trace_repo_setup(prefix);
- setup_work_tree();
-
options.allow_empty_message = 1;
git_config(rebase_config, &options);
@@ -2126,7 +2122,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
strbuf_addf(&msg, "%s: checkout %s",
getenv(GIT_REFLOG_ACTION_ENVIRONMENT), options.onto_name);
if (reset_head(&options.onto->object.oid, "checkout", NULL,
- RESET_HEAD_DETACH | RESET_ORIG_HEAD |
+ RESET_HEAD_DETACH | RESET_ORIG_HEAD |
RESET_HEAD_RUN_POST_CHECKOUT_HOOK,
NULL, msg.buf))
die(_("Could not detach HEAD"));
diff --git a/git.c b/git.c
index a960476857..74ad855356 100644
--- a/git.c
+++ b/git.c
@@ -551,12 +551,7 @@ static struct cmd_struct commands[] = {
{ "push", cmd_push, RUN_SETUP },
{ "range-diff", cmd_range_diff, RUN_SETUP | USE_PAGER },
{ "read-tree", cmd_read_tree, RUN_SETUP | SUPPORT_SUPER_PREFIX},
- /*
- * NEEDSWORK: Until the rebase is independent and needs no redirection
- * to rebase shell script this is kept as is, then should be changed to
- * RUN_SETUP | NEED_WORK_TREE
- */
- { "rebase", cmd_rebase },
+ { "rebase", cmd_rebase, RUN_SETUP | NEED_WORK_TREE },
{ "rebase--interactive", cmd_rebase__interactive, RUN_SETUP | NEED_WORK_TREE },
{ "receive-pack", cmd_receive_pack },
{ "reflog", cmd_reflog, RUN_SETUP },