Web lists-archives.com

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

On Mon, May 15, 2017 at 8:53 PM, Jeff King <peff@xxxxxxxx> wrote:
>> > So I suspect if you added an extraneous semi-colon, your case would work
>> > again (and that would confirm for us that this is indeed the problem).
>> Wow, that's a brilliant analysis.
> If it's right. :) It's all theory at this point.
> My /bin/sh isn't bash, but I should be able to build with
> SHELL_PATH=/bin/bash to reproduce. But I can't:

Just to clarify if there was any doubt, the semicolon trick does
indeed work fine when bash is your shell.

It would be nice if it were consistent for all git commands that take
a <cmd> argument:

  foo() { echo foo; }
  export -f foo
  git bisect start master master^^
  git bisect run foo  # works
  git bisect run 'foo;'  # doesn't work
running foo;
/usr/lib/git-core/git-bisect: line 493: foo;: command not found

Also, what's a "simple command", exactly?

  foo() { echo foo; }
  export -f foo
  git rebase --exec foo master^^  # fails
  git rebase --exec 'foo;' master^^  # OK
  git rebase --exec 'foo 1' master^^  # OK

Not sure if this can be made easy to understand in the manpage.