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: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
39cb6445d9
commit
ad687b447a
|
@ -90,11 +90,14 @@ call_merge () {
|
||||||
|
|
||||||
finish_rb_merge () {
|
finish_rb_merge () {
|
||||||
move_to_original_branch
|
move_to_original_branch
|
||||||
|
if test -s "$state_dir"/rewritten
|
||||||
|
then
|
||||||
git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
|
git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
|
||||||
if test -x "$GIT_DIR"/hooks/post-rewrite &&
|
if test -x "$GIT_DIR"/hooks/post-rewrite
|
||||||
test -s "$state_dir"/rewritten; then
|
then
|
||||||
"$GIT_DIR"/hooks/post-rewrite rebase <"$state_dir"/rewritten
|
"$GIT_DIR"/hooks/post-rewrite rebase <"$state_dir"/rewritten
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
rm -r "$state_dir"
|
rm -r "$state_dir"
|
||||||
say All done.
|
say All done.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue