git.droids-corp.org
/
git-central.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reproduce and fix with gc-pull the merge replay problem.
[git-central.git]
/
scripts
/
gc-pull
diff --git
a/scripts/gc-pull
b/scripts/gc-pull
index
1844725
..
fcde7b9
100644
(file)
--- a/
scripts/gc-pull
+++ b/
scripts/gc-pull
@@
-1,7
+1,18
@@
#!/bin/sh
#!/bin/sh
+#!/bin/sh
+
+branch_name=$(git symbolic-ref --quiet HEAD)
+if [[ $? -ne 0 ]] ; then
+ echo "not on a branch"
+ exit 1
+fi
+
+branch_name=${branch_name/refs\/heads\//}
+
+git fetch
+if [[ $? -ne 0 ]] ; then
+ exit $?
+fi
-#
-# Note: we should use `git pull --rebase origin <branch>`?
-#
-git pull --rebase $*
+GIT_EDITOR=: git rebase -p -i "origin/$branch_name"