]> rtime.felk.cvut.cz Git - git.git/blobdiff - git-am.sh
rebase: support automatic notes copying
[git.git] / git-am.sh
index 1056e7db6bba15112022421e3b3f9e3bdb96919f..7644474bcabc191ef11ce6b885a62794ec730a9c 100755 (executable)
--- 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