diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-10-06 08:56:07 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-10-06 08:56:07 -0700 |
commit | 276328ffb87cefdc515bee5f09916aea6e0244ed (patch) | |
tree | 162b276adac033e8a41266071e046f0f4cf4cd6d /git-rebase--interactive.sh | |
parent | 048f2762007d022defceb6850a44bc1bd5ccebf7 (diff) | |
parent | e261cf94848d31868c21fb11cade51c30dfcdbe7 (diff) | |
download | git-276328ffb87cefdc515bee5f09916aea6e0244ed.tar.gz |
Merge branch 'maint'
* maint:
Update release notes for 1.6.0.3
Teach rebase -i to honor pre-rebase hook
docs: describe pre-rebase hook
do not segfault if make_cache_entry failed
make prefix_path() never return NULL
fix bogus "diff --git" header from "diff --no-index"
Fix fetch/clone --quiet when stdout is connected
builtin-blame: Fix blame -C -C with submodules.
bash: remove fetch, push, pull dashed form leftovers
Conflicts:
diff.c
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-x | git-rebase--interactive.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index edb6ec6ed0..3350f90cb1 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -65,6 +65,16 @@ output () { esac } +run_pre_rebase_hook () { + if test -x "$GIT_DIR/hooks/pre-rebase" + then + "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || { + echo >&2 "The pre-rebase hook refused to rebase." + exit 1 + } + fi +} + require_clean_work_tree () { # test if working tree is dirty git rev-parse --verify HEAD > /dev/null && @@ -507,6 +517,7 @@ 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" |