summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index 1056e7db6b..7644474bca 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -780,8 +780,11 @@ do
go_next
done
-if test -s "$dotest"/rewritten && test -x "$GIT_DIR"/hooks/post-rewrite; then
+if test -s "$dotest"/rewritten; then
+ git notes copy --for-rewrite=rebase < "$dotest"/rewritten
+ if test -x "$GIT_DIR"/hooks/post-rewrite; then
"$GIT_DIR"/hooks/post-rewrite rebase < "$dotest"/rewritten
+ fi
fi
git gc --auto