Merge branch 'js/rebase-i-rerere'
* js/rebase-i-rerere: rebase -i: give rerere a chance
This commit is contained in:
commit
ac4d528ec1
@ -95,6 +95,7 @@ make_patch () {
|
|||||||
|
|
||||||
die_with_patch () {
|
die_with_patch () {
|
||||||
make_patch "$1"
|
make_patch "$1"
|
||||||
|
git rerere
|
||||||
die "$2"
|
die "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,13 +181,13 @@ pick_one_preserving_merges () {
|
|||||||
msg="$(git cat-file commit $sha1 | sed -e '1,/^$/d')"
|
msg="$(git cat-file commit $sha1 | sed -e '1,/^$/d')"
|
||||||
# No point in merging the first parent, that's HEAD
|
# No point in merging the first parent, that's HEAD
|
||||||
new_parents=${new_parents# $first_parent}
|
new_parents=${new_parents# $first_parent}
|
||||||
# NEEDSWORK: give rerere a chance
|
|
||||||
if ! GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
|
if ! GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
|
||||||
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
|
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
|
||||||
GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
|
GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
|
||||||
output git merge $STRATEGY -m "$msg" \
|
output git merge $STRATEGY -m "$msg" \
|
||||||
$new_parents
|
$new_parents
|
||||||
then
|
then
|
||||||
|
git rerere
|
||||||
printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
|
printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
|
||||||
die Error redoing merge $sha1
|
die Error redoing merge $sha1
|
||||||
fi
|
fi
|
||||||
@ -374,6 +375,7 @@ do
|
|||||||
--abort)
|
--abort)
|
||||||
comment_for_reflog abort
|
comment_for_reflog abort
|
||||||
|
|
||||||
|
git rerere clear
|
||||||
test -d "$DOTEST" || die "No interactive rebase running"
|
test -d "$DOTEST" || die "No interactive rebase running"
|
||||||
|
|
||||||
HEADNAME=$(cat "$DOTEST"/head-name)
|
HEADNAME=$(cat "$DOTEST"/head-name)
|
||||||
@ -390,6 +392,7 @@ do
|
|||||||
--skip)
|
--skip)
|
||||||
comment_for_reflog skip
|
comment_for_reflog skip
|
||||||
|
|
||||||
|
git rerere clear
|
||||||
test -d "$DOTEST" || die "No interactive rebase running"
|
test -d "$DOTEST" || die "No interactive rebase running"
|
||||||
|
|
||||||
output git reset --hard && do_rest
|
output git reset --hard && do_rest
|
||||||
|
Loading…
Reference in New Issue
Block a user