Thread (29 messages) 29 messages, 9 authors, 2017-05-16

Re: git rebase regression: cannot pass a shell expression directly to --exec

flat view

From: Eric Rannaud <hidden>
Date: 2017-05-16 16:59:09

On Tue, May 16, 2017 at 9:18 AM, Jeff King [off-list ref] wrote:
On Tue, May 16, 2017 at 12:23:02PM +0200, Johannes Schindelin wrote:
quoted
It would appear to me that you used a side effect of an implementation
detail: that `git rebase -i` was implemented entirely as a shell script.
I don't think that's true at all. He expected the user-provided "--exec"
command to be run by a shell, which seems like a reasonable thing for
Git to promise (and we already make a similar promise for most
user-provided commands that we run).  What happens in between, be it
As a "user", my expectation was simply that the command would be run
not just in "a shell", but in *my* shell (or the shell that calls git,
maybe). So I don't see any portability question with respect to Git.
My script that uses git rebase --exec may not be portable, but that's
my problem.

When I use "git rebase --exec <cmd>" I'm basically writing a "foreach
commit in range { <cmd> }" in my shell. Same idea with git bisect run.

A transparent optimization that tries execve() then falls back to the
user's shell sounds like a good idea.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help