459,464d458
< if (options.diff_filename == '-' and
< not options.username and not options.submit_as and
< not options.password):
< die('Authentication information needs to be provided on '
< 'the command line when using --diff-filename=-')
<
3770c3764,3773
< diff, parent_diff = tool.diff(args)
---
> # If post-review is executed in a pipe, behave as if diff_filename == '-'
> fd = sys.stdin.fileno()
> mode = os.fstat(fd).st_mode
> is_fifo = stat.S_ISFIFO( mode )
> if is_fifo:
> diff = sys.stdin.read()
> options.diff_filename = '-'
> parent_diff = None
> else:
> diff, parent_diff = tool.diff(args)