Re: [PATCHv6 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-23 Thread Remi Galan Alfonso
Junio C Hamano writes: > Galan Rémi writes: > > > I used: > >read -r command sha1 rest < >$line > >EOF > > because > >printf '%s' "$line" | read -r command sha1 rest > > doesn't work (the 3 variables have no value as a result). > > There might be a better way to do this, but

Re: [PATCHv6 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-23 Thread Junio C Hamano
Galan Rémi writes: > I used: >read -r command sha1 rest <$line >EOF > because >printf '%s' "$line" | read -r command sha1 rest > doesn't work (the 3 variables have no value as a result). > There might be a better way to do this, but I don't have it right now. while r

[PATCHv6 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-22 Thread Galan Rémi
Check before the start of the rebasing if the commands exists, and for the commands expecting a SHA-1, check if the SHA-1 is present and corresponds to a commit. In case of error, print the error, stop git rebase and prompt the user to fix with 'git rebase --edit-todo' or to abort. This allows to