From 31693ebf3e7cfb3e691a4ef22e8cdeda6b3146d9 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 21 Oct 2011 23:27:09 -0500 Subject: [PATCH] Teach 'git pull' to handle --rebase=interactive Signed-off-by: Johannes Schindelin --- Documentation/git-pull.txt | 4 +++- git-pull.sh | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 200eb22260..2f626dc0e1 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -104,7 +104,7 @@ Options related to merging include::merge-options.txt[] -r:: ---rebase[=false|true|preserve]:: +--rebase[=false|true|preserve|interactive]:: When true, rebase the current branch on top of the upstream branch after fetching. If there is a remote-tracking branch corresponding to the upstream branch and the upstream branch @@ -117,6 +117,8 @@ locally created merge commits will not be flattened. + When false, merge the current branch into the upstream branch. + +When `interactive`, enable the interactive mode of rebase. ++ See `pull.rebase`, `branch..rebase` and `branch.autosetuprebase` in linkgit:git-config[1] if you want to make `git pull` always use `--rebase` instead of merging. diff --git a/git-pull.sh b/git-pull.sh index 0a5aa2c821..a482d91a90 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -122,6 +122,7 @@ do ;; --no-r|--no-re|--no-reb|--no-reba|--no-rebas|--no-rebase) rebase=false + ;; --recurse-submodules) recurse_submodules=--recurse-submodules @@ -153,6 +154,10 @@ do done case "$rebase" in +i|interactive) + rebase=true + rebase_args=-i + ;; preserve) rebase=true rebase_args=--preserve-merges @@ -160,7 +165,7 @@ preserve) true|false|'') ;; *) - echo "Invalid value for --rebase, should be true, false, or preserve" + echo "Invalid value for --rebase, should be true, false, interactive or preserve" usage exit 1 ;; -- 2.11.4.GIT