Re: [PATCH 1/3] t7504: document regression: reword no longer calls commit-msg
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- Mar 22, 2017, 15:18 UTC
- Message-ID
- <CAHGBnuPL9CUincZkFR758KcZL3-Ra=n_fbsc1EQ=vio2scod5w@mail.gmail.com>
- In-Reply-To
- <773531a3892fb78e8f70e540fc000bceb2c1bb7b.1490194846.git.johannes.schindelin@gmx.de>
On Wed, Mar 22, 2017 at 4:01 PM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
> Noticed by Sebastian Schuberth.
Thanks for working on the fix.
Show 6 quoted lines
> +# set up fake editor to replace `pick` by `reword` > +cat > reword-editor <<'EOF' > +#!/bin/sh > +mv "$1" "$1".bup && > +sed 's/^pick/reword/' <"$1".bup >"$1" > +EOF
Maybe use
sed -i 's/^pick/reword/' "$1"
here to avoid renaming the input file? Not sure how portable -i for sed is, though. Otherwise, maybe remove the file "$1".bup afterwards to be clean?
-- Sebastian Schuberth