aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-02 01:45:47 -0700
committerJunio C Hamano <gitster@pobox.com>2007-07-02 01:45:47 -0700
commitf36db549057f09dd390d712fa2d72dd2599feba6 (patch)
tree3f58a55fe4761614cf358090cd57ac5037302fd0 /git-rebase.sh
parente1bc8dc66dd5a2ef8b23c6b7cac8164d85e73307 (diff)
parentf09c9b8c5ff9d8a15499b09ccd6c3e7b3c76af77 (diff)
downloadgit-f36db549057f09dd390d712fa2d72dd2599feba6.tar.gz
git-f36db549057f09dd390d712fa2d72dd2599feba6.tar.xz
Merge branch 'js/rebase'
* js/rebase: Teach rebase -i about --preserve-merges rebase -i: provide reasonable reflog for the rebased branch rebase -i: several cleanups ignore git-rebase--interactive Teach rebase an interactive mode Move the pick_author code to git-sh-setup
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 2aa3a011d..388752661 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2005 Junio C Hamano.
#
-USAGE='[-v] [--onto <newbase>] <upstream> [<branch>]'
+USAGE='[--interactive | -i] [-v] [--onto <newbase>] <upstream> [<branch>]'
LONG_USAGE='git-rebase replaces <branch> with a new branch of the
same name. When the --onto option is provided the new branch starts
out with a HEAD equal to <newbase>, otherwise it is equal to <upstream>
@@ -120,6 +120,16 @@ finish_rb_merge () {
echo "All done."
}
+is_interactive () {
+ test -f "$dotest"/interactive ||
+ while case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac
+ do
+ shift
+ done && test -n "$1"
+}
+
+is_interactive "$@" && exec git-rebase--interactive "$@"
+
while case "$#" in 0) break ;; esac
do
case "$1" in