提交 ad687b44 编写于 作者: A Andrew Wong 提交者: Junio C Hamano

rebase -m: only call "notes copy" when rewritten exists and is non-empty

This prevents a shell error complaining rebase-merge/rewritten doesn't exist.
Signed-off-by: NAndrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 39cb6445
......@@ -90,10 +90,13 @@ call_merge () {
finish_rb_merge () {
move_to_original_branch
git notes copy --for-rewrite=rebase < "$state_dir"/rewritten
if test -x "$GIT_DIR"/hooks/post-rewrite &&
test -s "$state_dir"/rewritten; then
"$GIT_DIR"/hooks/post-rewrite rebase < "$state_dir"/rewritten
if test -s "$state_dir"/rewritten
then
git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
if test -x "$GIT_DIR"/hooks/post-rewrite
then
"$GIT_DIR"/hooks/post-rewrite rebase <"$state_dir"/rewritten
fi
fi
rm -r "$state_dir"
say All done.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册