MCPcopy Index your code
hub / github.com/git/git / read_pipe

Function read_pipe

git-p4.py:362–377  ·  view source on GitHub ↗

Read output from command. Returns the output text on success. On failure, terminates execution, unless ignore_error is True, when it returns an empty string. If raw is True, do not attempt to decode output text.

(c, ignore_error=False, raw=False, *k, **kw)

Source from the content-addressed store, hash-verified

360
361
362def read_pipe(c, ignore_error=False, raw=False, *k, **kw):
363 """Read output from command. Returns the output text on success. On
364 failure, terminates execution, unless ignore_error is True, when it
365 returns an empty string.
366
367 If raw is True, do not attempt to decode output text.
368 """
369 retcode, out, err = read_pipe_full(c, *k, **kw)
370 if retcode != 0:
371 if ignore_error:
372 out = ""
373 else:
374 die('Command failed: {}\nError: {}'.format(' '.join(c), err))
375 if not raw:
376 out = decode_text_stream(out)
377 return out
378
379
380def read_pipe_text(c, *k, **kw):

Callers 15

git_dirFunction · 0.85
p4_read_pipeFunction · 0.85
parseRevisionFunction · 0.85
branchExistsFunction · 0.85
gitConfigFunction · 0.85
gitConfigIntFunction · 0.85
gitConfigListFunction · 0.85
p4UserForCommitMethod · 0.85
edit_templateMethod · 0.85
applyCommitMethod · 0.85
runMethod · 0.85
importP4LabelsMethod · 0.85

Calls 3

read_pipe_fullFunction · 0.85
decode_text_streamFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected