-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
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 thecommithashIn 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 thecommithashTo 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 thecommithashBasically, echo2, compared with stdin, should create a raw pipeline stdin from its arguments literally, instead of files specified by the arguments.
Metadata
Metadata
Assignees
Labels
No labels