]> git.ipfire.org Git - thirdparty/git.git/commit - git-p4.py
git-p4: add read_pipe_text() internal function
authorLuke Diamand <luke@diamand.org>
Sat, 15 Apr 2017 10:36:08 +0000 (11:36 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2017 04:13:24 +0000 (21:13 -0700)
commit78871bf46f18cd92e744a993c1d6422ff30d8bca
treebeecbc0dc189b7660489f7b0b4474fb012408555
parent3d553cceb57a09e997ae403dbcd69ddb570e6f08
git-p4: add read_pipe_text() internal function

The existing read_pipe() function returns an empty string on
error, but also returns an empty string if the command returns
an empty string.

This leads to ugly constructions trying to detect error cases.

Add read_pipe_text() which just returns None on error.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py