Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
rebase: do not get confused in fast-forward situation.
author
Junio C Hamano
<junkio@cox.net>
Wed, 14 Dec 2005 11:11:37 +0000
(
03:11
-0800)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 14 Dec 2005 21:04:25 +0000
(13:04 -0800)
When switching to another branch and rebasing it in a one-go, it
failed to update the variable that holds the branch head, and
did not detect fast-forward situation correctly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-rebase.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
b0d3e9b
)
diff --git
a/git-rebase.sh
b/git-rebase.sh
index 8a5f44aa5e0a732b27a1fde307f77bc810574e7e..c1619ff1400f68300d5026a00baf72e27f268ba1 100755
(executable)
--- a/
git-rebase.sh
+++ b/
git-rebase.sh
@@
-6,6
+6,8
@@
USAGE='<upstream> [<head>]'
. git-sh-setup
+case $# in 1|2) ;; *) usage ;; esac
+
# Make sure we do not have .dotest
if mkdir .dotest
then
@@
-37,6
+39,7
@@
esac
# If the branch to rebase is given, first switch to it.
case "$#" in
2)
+ head=$(git-rev-parse --verify "$2^") || usage
git-checkout "$2" || usage
esac