2

I'm trying to write a powershell script that uses the git commit-tree command but it's documentation says (http://schacon.github.com/git/git-commit-tree.html):

A commit comment is read from stdin. If a changelog entry is not provided via "<" redirection, git commit-tree will just wait for one to be entered and terminated with ^D.

Is writing to stdin like this possible in powershell somehow? Is there some work around?

1 Answer 1

4

PowerShell doesn't support stdin redirection (using <). It does support stdin piping e.g.:

Get-Date | exe_that_takes_stdin.exe

If your git command doesn't work that way (perhaps uses normal stdin for something else), check out this blog post. It looks like they're shelling out to cmd.exe for the stdin redirection support.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.