projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix cpio call
[git.git]
/
git-rebase.sh
diff --git
a/git-rebase.sh
b/git-rebase.sh
index
16d4359
..
f84160d
100755
(executable)
--- a/
git-rebase.sh
+++ b/
git-rebase.sh
@@
-36,6
+36,15
@@
other=$(git-rev-parse --verify "$1^0") || usage
# Make sure the branch to rebase is valid.
head=$(git-rev-parse --verify "${2-HEAD}^0") || exit
# Make sure the branch to rebase is valid.
head=$(git-rev-parse --verify "${2-HEAD}^0") || exit
+# If a hook exists, give it a chance to interrupt
+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
+
# If the branch to rebase is given, first switch to it.
case "$#" in
2)
# If the branch to rebase is given, first switch to it.
case "$#" in
2)