[RFC] rebase: Handle cases where format-patch fails

2012-10-04 Thread Andrew Wong
'format-patch' could fail due to reasons such as out of memory. Such failures are not detected or handled, which causes rebase to incorrectly think that it completed successfully and continue with cleanup. i.e. calling move_to_original_branch Since only the exit status of the last command in the p

[RFC] rebase: Handle cases where format-patch fails

2012-10-08 Thread Andrew Wong
'format-patch' could fail due to reasons such as out of memory. Such failures are not detected or handled, which causes rebase to incorrectly think that it completed successfully and continue with cleanup. i.e. calling move_to_original_branch Instead of using a pipe, we separate 'format-patch' and

Re: [RFC] rebase: Handle cases where format-patch fails

2012-10-05 Thread Junio C Hamano
Andrew Wong writes: > 'format-patch' could fail due to reasons such as out of memory. Such > failures are not detected or handled, which causes rebase to incorrectly > think that it completed successfully and continue with cleanup. i.e. > calling move_to_original_branch > > Since only the exit st

Re: [RFC] rebase: Handle cases where format-patch fails

2012-10-08 Thread Andrew Wong
Here's an alternate method for handling 'format-patch' failing. We remove the pipe between 'format-patch' and 'am' by storing the patch in an intermediate file. This means we can gurantee that 'am' is always invokved with the complete input. I did some timing on rebasing 500 commits from the git

Re: [RFC] rebase: Handle cases where format-patch fails

2012-10-08 Thread Junio C Hamano
Andrew Wong writes: > 'format-patch' could fail due to reasons such as out of memory. Such > failures are not detected or handled, which causes rebase to incorrectly > think that it completed successfully and continue with cleanup. i.e. > calling move_to_original_branch > > Instead of using a pip