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>
This commit is contained in:
parent
39cb6445d9
commit
ad687b447a
@ -90,11 +90,14 @@ call_merge () {
|
||||
|
||||
finish_rb_merge () {
|
||||
move_to_original_branch
|
||||
if test -s "$state_dir"/rewritten
|
||||
then
|
||||
git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
|
||||
if test -x "$GIT_DIR"/hooks/post-rewrite &&
|
||||
test -s "$state_dir"/rewritten; then
|
||||
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.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user