Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-01-03 01:28:26 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-04 01:22:50 +0300
commitd8fab0234d6db440a71f38f8538dbdefbbdfd077 (patch)
treec53817d6bc49b8b44da8333a10520575b780b781 /git-rebase--interactive.sh
parent8104ebfe8276657ee803cca7eb8665a78cf3ef83 (diff)
rebase -i: execute hook only after argument checking
Previously, the pre-rebase-hook would be launched before we knew if the <upstream> [<branch>] arguments were supplied. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index c8b0861c08..2c668cd81a 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -554,7 +554,6 @@ first and then run 'git rebase --continue' again."
;;
--)
shift
- run_pre_rebase_hook ${1+"$@"}
test $# -eq 1 -o $# -eq 2 || usage
test -d "$DOTEST" &&
die "Interactive rebase already started"
@@ -562,11 +561,13 @@ first and then run 'git rebase --continue' again."
git var GIT_COMMITTER_IDENT >/dev/null ||
die "You need to set your committer info first"
+ UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
+ run_pre_rebase_hook ${1+"$@"}
+
comment_for_reflog start
require_clean_work_tree
- UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
test -z "$ONTO" && ONTO=$UPSTREAM
if test ! -z "$2"