+ : rebase_in_progress & !sequencer_in_useĬommit_list_insert(current_head, &parents) ĭiff -git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip. + reflog_msg = (whence != FROM_CHERRY_PICK) reflog_msg = (whence = FROM_CHERRY_PICK) + die(_("You are in the middle of a rebase - cannot amend.")) ĭie(_("You are in the middle of a cherry-pick - cannot amend.")) ĭie(_("Options -squash and -fixup cannot be used -1628,9 +1641,11 int cmd_commit(int argc, const char **argv, const char *prefix) Return -1156,8 +1166,11 static int parse_and_validate_options(int argc, const char *argv,ĭie(_("You are in the middle of a merge - cannot amend.")) + fputs(_(empty_cherry_pick_advice_single), stderr) fputs(_(empty_cherry_pick_advice_single), stderr) įputs(_(empty_cherry_pick_advice_multi), stderr) If (list_paths(&partial, !current_head ? NULL : "HEAD", -950,10 +958,12 static int prepare_to_commit(const char *index_file, const char *prefix,įputs(_(empty_cherry_pick_advice), stderr) + die(_("cannot do a partial commit during a rebase.")) ĭie(_("cannot do a partial commit during a cherry-pick.")) + if (rebase_in_progress & !sequencer_in_use) Whence = -453,8 +458,11 static const char *prepare_index(int argc, const char **argv, const char *prefixĭie(_("cannot do a partial commit during a merge.")) + if (file_exists(git_path_rebase_merge_dir())) Static struct strbuf message = -183,6 +186,8 static void determine_whence(struct wt_status *s) Static int use_editor = 1, include_status = 1 +static int sequencer_in_use, rebase_in_progress N_("Otherwise, please use 'git cherry-pick -122,7 +125,7 static enum commit_msg_cleanup_mode cleanup_mode Static const char empty_cherry_pick_advice_single = +N_("Otherwise, please use 'git rebase -skip'\n") +++ -59,6 +59,9 N_("The previous cherry-pick is now empty, possibly due to conflict resolution.\ `sequencer/` exist, we still want to advise to use `git cherry-pickīuiltin/commit.c | 33 ++++++++++++++++++++++++-Ģ files changed, 33 insertions(+), 9 deletions(-)ĭiff -git a/builtin/commit.c b/builtin/commit.c Run a rebase during a cherry-pick, meaning: if both `rebase-merge/` and Note: we take pains to handle the situation when a user runs a `gitĬherry-pick` _during_ a rebase. Surely this must be a `cherry-pick` in progress. We’re using the git rebase command with the -i flag (to indicate we indeed want it to. Incorrectly assumed that the presence of a `CHERRY_PICK_HEAD` meant that Step 2: starting the actual session Starting the actual session is pretty simple: git rebase -i HEAD3. While at it, we adjust more places in `builtin/commit.c` that Let's suggest the correct command, even during a rebase. Suggested the neutral `git reset`): the same can happen during a rebase. `git cherry-pick` when this advice is printed (which originally However, it was overlooked that there are more conditions than just a `git commit` learned to suggest to run `git cherry-pick -skip` when The drop command was added in 2.6.0-rc1: 'git rebase -i' learned 'drop commit-object-name subject' command as another way to skip replaying of a commit. See when you scroll down: If you remove a line here THAT COMMIT WILL BE LOST. In dcb500dc16c (cherry-pick/revert: advise using -skip, ), Marking a commit as drop is the same as deleting the line.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |