git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] cat-file: force flush of stdout on empty string
@ 2021-11-05 21:56 John Cai via GitGitGadget
  2021-11-05 21:56 ` [PATCH 1/2] " John Cai via GitGitGadget
  2021-11-05 21:56 ` [PATCH 2/2] docs: update behavior of git-cat-file --buffer John Cai via GitGitGadget
  0 siblings, 2 replies; 8+ messages in thread
From: John Cai via GitGitGadget @ 2021-11-05 21:56 UTC (permalink / raw)
  To: git; +Cc: John Cai

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
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-08 20:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 21:56 [PATCH 0/2] cat-file: force flush of stdout on empty string John Cai via GitGitGadget
2021-11-05 21:56 ` [PATCH 1/2] " John Cai via GitGitGadget
2021-11-06  0:58   ` Junio C Hamano
2021-11-06  4:01     ` Ævar Arnfjörð Bjarmason
2021-11-08  3:42       ` John Cai
2021-11-08 15:15         ` Ævar Arnfjörð Bjarmason
2021-11-08 20:11           ` Junio C Hamano
2021-11-05 21:56 ` [PATCH 2/2] docs: update behavior of git-cat-file --buffer John Cai via GitGitGadget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).