X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-rebase--interactive.sh;h=436b7f5977c05c347debc12130f822af482c03e3;hb=39b5977b1391b0ee1fdfecf04955c32192f64936;hp=2ff211cbaa928275857577535f02ae92cb407f2f;hpb=df9930c129d4cfe4d39e5e4688a6a55a2bca0050;p=git.git diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 2ff211cba..436b7f597 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -20,6 +20,7 @@ v,verbose display a diffstat of what changed upstream onto= rebase onto given branch instead of upstream p,preserve-merges try to recreate merges instead of ignoring them s,strategy= use the given merge strategy +no-ff cherry-pick all commits, even if unchanged m,merge always used (no-op) i,interactive always used (no-op) Actions: @@ -110,6 +111,7 @@ VERBOSE= OK_TO_SKIP_PRE_REBASE= REBASE_ROOT= AUTOSQUASH= +NEVER_FF= GIT_CHERRY_PICK_HELP=" After resolving the conflicts, mark the corrected paths with 'git add ', and @@ -232,6 +234,7 @@ do_with_author () { pick_one () { ff=--ff case "$1" in -n) sha1=$2; ff= ;; *) sha1=$1 ;; esac + case "$NEVER_FF" in '') ;; ?*) ff= ;; esac output git rev-parse --verify $sha1 || die "Invalid commit name: $sha1" test -d "$REWRITTEN" && pick_one_preserving_merges "$@" && return @@ -562,6 +565,7 @@ do_next () { git diff-tree --stat $(cat "$DOTEST"/head)..HEAD } && { + test -s "$REWRITTEN_LIST" && git notes copy --for-rewrite=rebase < "$REWRITTEN_LIST" || true # we don't care if this copying failed } && @@ -782,6 +786,9 @@ first and then run 'git rebase --continue' again." -i) # yeah, we know ;; + --no-ff) + NEVER_FF=t + ;; --root) REBASE_ROOT=t ;; @@ -965,7 +972,7 @@ EOF has_action "$TODO" || die_abort "Nothing to do" - test -d "$REWRITTEN" || skip_unnecessary_picks + test -d "$REWRITTEN" || test -n "$NEVER_FF" || skip_unnecessary_picks git update-ref ORIG_HEAD $HEAD output git checkout $ONTO && do_rest