MCPcopy Create free account
hub / github.com/git/git / read_pipe_text

Function read_pipe_text

git-p4.py:380–388  ·  view source on GitHub ↗

Read output from a command with trailing whitespace stripped. On error, returns None.

(c, *k, **kw)

Source from the content-addressed store, hash-verified

378
379
380def read_pipe_text(c, *k, **kw):
381 """Read output from a command with trailing whitespace stripped. On error,
382 returns None.
383 """
384 retcode, out, err = read_pipe_full(c, *k, **kw)
385 if retcode != 0:
386 return None
387 else:
388 return decode_text_stream(out).rstrip()
389
390
391def p4_read_pipe(c, ignore_error=False, raw=False, *k, **kw):

Callers 1

currentGitBranchFunction · 0.85

Calls 2

read_pipe_fullFunction · 0.85
decode_text_streamFunction · 0.85

Tested by

no test coverage detected