google / git-appraise

Distributed code review system for Git repos
Apache License 2.0
5.14k stars 146 forks source link

Allowing stdin in the case of comment -F #58

Closed hazbo closed 8 years ago

hazbo commented 8 years ago

As mentioned in #56, passing - for stdin with -F will now read. This is partially inspired by how git approaches this issue. Here are a couple of examples of how comments can be made as of this commit:

echo 'hello!' | git appraise comment -F - HASH

git appraise comment -F - HASH
(reading comment from standard input)
hello!

(ctrl+D to exit from the attached version) Feedback / thoughts would be appreciated! :)

ojarjur commented 8 years ago

Thanks for putting this together.

Overall, I think it looks good. The only feedback I have is the inline comment about Scan() dropping newlines that it encounters.

hazbo commented 8 years ago

Hey Omar! Sorry this took me so long to get back to. This seems to do the trick.

If this seems okay with you, would it be a good idea to now implement this among the other relevant subcommands?

ojarjur commented 8 years ago

Sorry this took me so long to get back to.

No need to apologize. I really appreciate the amount of work you've put in to this.

If this seems okay with you, would it be a good idea to now implement this among the other relevant subcommands?

Yes, I think this looks really good now. I'll get this submitted tomorrow unless you want me to wait. The other commands can always go in a later PR.

Thanks again for all of your help.

hazbo commented 8 years ago

Alright! Sounds good to me. I'll get the other commands done soon as I can in a separate PR.