Skip to content

cat-file: force flush of stdout on empty string

John Cai via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cat-file: force flush of stdout on empty stringbuiltin/cat-file.c+10 -15 replies
2/2docs: update behavior of git-cat-file --bufferDocumentation/git-cat-file.txt+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] cat-file: force flush of stdout on empty string

When in --buffer mode, it is very useful for the caller to have control over when the buffer is flushed. Currently there is no convenient way to signal for the buffer to be flushed. One workaround is to provide any nonexisting commit to git-cat-file's stdin, in which case the buffer will be flushed and a "$FOO missing" message will be displayed. However, this is not an ideal workaround.

Instead, this commit teaches git-cat-file to look for an empty string in stdin, which will trigger a flush of stdout.

John Cai (2):
cat-file: force flush of stdout on empty string
docs: update behavior of git-cat-file --buffer

 Documentation/git-cat-file.txt |  3 ++-
 builtin/cat-file.c             | 11 ++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

base-commit: 6d82a21a3b699caf378cb0f89b6b0e803fc58480
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1124%2Fjohn-cai%2Fjc%2Fflush-buffer-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1124/john-cai/jc/flush-buffer-v1
Pull-Request: https://github.com/git/git/pull/1124

Signature · 1 line
gitgitgadget