From: Junio C Hamano Date: Mon, 5 Oct 2015 19:30:21 +0000 (-0700) Subject: Merge branch 'jk/rebase-no-autostash' X-Git-Tag: v2.7.0-rc0~134 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6560584494a8053431d0c8e90b78d50f71c8055b?ds=inline;hp=-c Merge branch 'jk/rebase-no-autostash' There was no way to defeat a configured rebase.autostash variable from the command line, as "git rebase --no-autostash" was missing. * jk/rebase-no-autostash: Documentation/git-rebase: fix --no-autostash formatting rebase: support --no-autostash --- 6560584494a8053431d0c8e90b78d50f71c8055b diff --combined Documentation/git-rebase.txt index ca039546a4,73cba04887..72e69fc165 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@@ -80,7 -80,7 +80,7 @@@ remain the checked-out branch If the upstream branch already contains a change you have made (e.g., because you mailed a patch which was applied upstream), then that commit will be skipped. For example, running `git rebase master` on the -following history (in which A' and A introduce the same set of changes, +following history (in which `A'` and `A` introduce the same set of changes, but have different committer information): ------------ @@@ -207,21 -207,12 +207,21 @@@ rebase.stat: Whether to show a diffstat of what changed upstream since the last rebase. False by default. -rebase.autosquash:: +rebase.autoSquash:: If set to true enable '--autosquash' option by default. -rebase.autostash:: +rebase.autoStash:: If set to true enable '--autostash' option by default. +rebase.missingCommitsCheck:: + If set to "warn", print warnings about removed commits in + interactive mode. If set to "error", print the warnings and + stop the rebase. If set to "ignore", no checking is + done. "ignore" by default. + +rebase.instructionFormat:: + Custom commit list format to use during an '--interactive' rebase. + OPTIONS ------- --onto :: @@@ -368,16 -359,10 +368,16 @@@ default is `--no-fork-point`, otherwis Make a list of the commits which are about to be rebased. Let the user edit that list before rebasing. This mode can also be used to split commits (see SPLITTING COMMITS below). ++ +The commit list format can be changed by setting the configuration option +rebase.instructionFormat. A customized instruction format will automatically +have the long commit hash prepended to the format. -p:: --preserve-merges:: - Instead of ignoring merges, try to recreate them. + Recreate merge commits instead of flattening the history by replaying + commits a merge commit introduces. Merge conflict resolutions or manual + amendments to merge commits are not preserved. + This uses the `--interactive` machinery internally, but combining it with the `--interactive` option explicitly is generally not a good @@@ -429,10 -414,11 +429,11 @@@ squash/fixup series This option is only valid when the '--interactive' option is used. + If the '--autosquash' option is enabled by default using the -configuration variable `rebase.autosquash`, this option can be +configuration variable `rebase.autoSquash`, this option can be used to override and disable this setting. - --[no-]autostash:: + --autostash:: + --no-autostash:: Automatically create a temporary stash before the operation begins, and apply it after the operation ends. This means that you can run rebase on a dirty worktree. However, use @@@ -527,9 -513,6 +528,9 @@@ rebasing If you just want to edit the commit message for a commit, replace the command "pick" with the command "reword". +To drop a commit, replace the command "pick" with "drop", or just +delete the matching line. + If you want to fold two or more commits into one, replace the command "pick" for the second and subsequent commits with "squash" or "fixup". If the commits had different authors, the folded commit will be diff --combined git-rebase.sh index 1757404bc2,95a45938ad..af7ba5fd90 --- a/git-rebase.sh +++ b/git-rebase.sh @@@ -14,7 -14,7 +14,7 @@@ git-rebase --continue | --abort | --ski Available options are v,verbose! display a diffstat of what changed upstream q,quiet! be quiet. implies --no-stat - autostash! automatically stash/stash pop before and after + autostash automatically stash/stash pop before and after fork-point use 'merge-base --fork-point' to refine upstream onto=! rebase onto given branch instead of upstream p,preserve-merges! try to recreate merges instead of ignoring them @@@ -202,9 -202,9 +202,9 @@@ run_specific_rebase () run_pre_rebase_hook () { if test -z "$ok_to_skip_pre_rebase" && - test -x "$GIT_DIR/hooks/pre-rebase" + test -x "$(git rev-parse --git-path hooks/pre-rebase)" then - "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || + "$(git rev-parse --git-path hooks/pre-rebase)" ${1+"$@"} || die "$(gettext "The pre-rebase hook refused to rebase.")" fi } @@@ -292,6 -292,9 +292,9 @@@ d --autostash) autostash=true ;; + --no-autostash) + autostash=false + ;; --verbose) verbose=t diffstat=t @@@ -582,7 -585,7 +585,7 @@@ the # Lazily switch to the target branch if needed... test -z "$switch_to" || GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to" \ - git checkout "$switch_to" -- + git checkout -q "$switch_to" -- say "$(eval_gettext "Current branch \$branch_name is up to date.")" finish_rebase exit 0