In sh we can do the following:
echo 'Merge branch doc' | git commit-tree $(git write-tree) -p HEAD -p doc > thecommithash
git reset --soft $(cat thecommithash)
rm -f thecommithash
In PowerShell the following works, but thecommithash has strange encoding:
echo 'Merge branch doc' | git commit-tree $(git write-tree) -p HEAD -p doc > thecommithash
git reset --soft $(cat thecommithash)
rm -fo thecommithash
To take the benefit of Use-RawPipeline, it'd be better to have echo2:
echo2 'Merge branch doc' | run git commit-tree $(git write-tree) -p HEAD -p doc | out2 thecommithash
git reset --soft $(cat thecommithash)
rm -fo thecommithash
Basically, echo2, compared with stdin, should create a raw pipeline stdin from its arguments literally, instead of files specified by the arguments.
In sh we can do the following:
In PowerShell the following works, but
thecommithashhas strange encoding:To take the benefit of Use-RawPipeline, it'd be better to have
echo2:Basically,
echo2, compared withstdin, should create a raw pipeline stdin from its arguments literally, instead of files specified by the arguments.